ソースを参照

wip:超级订阅续费支持过期续费

wkyuer 1 ヶ月 前
コミット
2f1c7e1ac8

+ 1 - 1
internal/controller/orderHandler.go

@@ -138,7 +138,7 @@ var checkOrderProduct = func(ctx context.Context, orderCode string, param model.
 				err = gerror.Wrapf(priceErr, "核算%s价格异常", productClass.ClassName)
 				return
 			}
-			if gconv.Int(checkPrice) != originalPrice {
+			if checkPrice > -1 && gconv.Int(checkPrice) != originalPrice {
 				err = gerror.Newf("核算%s价格异常", productClass.ClassName)
 				return
 			}

+ 1 - 1
internal/logic/product/otherProduct/check.go

@@ -25,7 +25,7 @@ func (p jyOtherProduct) Check(ctx context.Context, t int) error { //参数校验
 	}
 	tClass = productClass.ClassName
 	//历史数据和结构化数据需要销售确认时间
-	if productClass.ClassName == "历史数据" || productClass.ClassName == "结构化数据" {
+	if productClass.ClassName == "历史数据" || productClass.ClassName == "结构化数据" || productClass.ClassName == "广告" {
 		if p.PackClassOrderDetail.Service_start_time == "" || p.PackClassOrderDetail.Service_end_time == "" {
 			return fmt.Errorf("%s缺失服务起始时间", tClass)
 		}

+ 1 - 1
internal/logic/product/otherProduct/saveUpdate.go

@@ -132,7 +132,7 @@ func (p jyOtherProduct) SaveUpdate(ctx context.Context, masterKey string) error
 			"is_master":      common.If(fmt.Sprintf("%s_%d", p.SimpleProduct.ProductCode, p.SimpleProduct.Amount) == masterKey, 1, 0),
 		}
 		//广告开始时间结束时间
-		if p.ProductName == "广告" {
+		if p.ProductName == "广告" && p.SimpleProduct.Service_start_time != "" && p.SimpleProduct.Service_end_time != "" {
 			orderMap["service_starttime"] = p.SimpleProduct.Service_start_time
 			orderMap["service_endtime"] = p.SimpleProduct.Service_end_time
 		}