wkyuer преди 1 месец
родител
ревизия
cf99b18ae7
променени са 2 файла, в които са добавени 12 реда и са изтрити 5 реда
  1. 5 0
      internal/logic/product/otherProduct/saveUpdate.go
  2. 7 5
      internal/model/otherProduct.go

+ 5 - 0
internal/logic/product/otherProduct/saveUpdate.go

@@ -127,6 +127,11 @@ func (p jyOtherProduct) SaveUpdate(ctx context.Context, masterKey string) error
 			"filter":         gconv.String(p.SimpleProduct.Filter),
 			"is_master":      common.If(fmt.Sprintf("%s_%d", p.SimpleProduct.ProductCode, p.SimpleProduct.Amount) == masterKey, 1, 0),
 		}
+		//广告开始时间结束时间
+		if p.ProductName == "广告" {
+			orderMap["service_starttime"] = p.SimpleProduct.Service_start_time
+			orderMap["service_endtime"] = p.SimpleProduct.Service_end_time
+		}
 	}
 	orderMap["product_type"] = p.ProductName
 	if orderDetailId > 0 {

+ 7 - 5
internal/model/otherProduct.go

@@ -27,10 +27,12 @@ type (
 	//**************************************************************
 	JyOtherSimpleProduct struct {
 		*ProductCommonParam
-		ProductType       string `json:"product_type,omitempty"`      //产品类型
-		ServiceType       int    `json:"service_type,omitempty"`      //付费类型 1:购买 2:续费 3:升级 4:试用
-		LinkedOrderId     int64  `json:"linked_orderId,omitempty"`    //关联订单明细id
-		PaybackOpenServer bool   `json:"paybackOpenServer,omitempty"` //是否全额回款开通
-		Filter            Simple `json:"filter,omitempty"`            //大字段
+		ProductType        string `json:"product_type,omitempty"`      //产品类型
+		ServiceType        int    `json:"service_type,omitempty"`      //付费类型 1:购买 2:续费 3:升级 4:试用
+		LinkedOrderId      int64  `json:"linked_orderId,omitempty"`    //关联订单明细id
+		PaybackOpenServer  bool   `json:"paybackOpenServer,omitempty"` //是否全额回款开通
+		Filter             Simple `json:"filter,omitempty"`            //大字段
+		Service_start_time string `json:"service_start_time"`
+		Service_end_time   string `json:"service_end_time"`
 	}
 )