abiao лет назад: 5
Родитель
Сommit
1cbed91f7b
1 измененных файлов с 3 добавлено и 0 удалено
  1. 3 0
      go/gopath/src/fohow.com/apps/helpers/promotion_helper.go

+ 3 - 0
go/gopath/src/fohow.com/apps/helpers/promotion_helper.go

@@ -51,6 +51,7 @@ func SetOrderPromotion(orderId string, wxUid int64) {
 		nums3 := int64(99)
 		nums4 := int64(99)
 		if item.Prod1 > 0 {
+			nums1 = int64(0)
 			detail1 := order_model.GetDetailsByOrderIdAndPid(orderId, item.Prod1)
 			if detail1 != nil && item.Prod1 > 0 && item.Nums1 > 0 {
 				nums1 = int64(detail1.Count / item.Nums1)
@@ -58,6 +59,7 @@ func SetOrderPromotion(orderId string, wxUid int64) {
 		}
 
 		if item.Prod2 > 0 {
+			nums2 = int64(0)
 			detail2 := order_model.GetDetailsByOrderIdAndPid(orderId, item.Prod2)
 			if detail2 != nil && item.Prod2 > 0 && item.Nums2 > 0 {
 				nums2 = int64(detail2.Count / item.Nums2)
@@ -65,6 +67,7 @@ func SetOrderPromotion(orderId string, wxUid int64) {
 		}
 
 		if item.Prod3 > 0 {
+			nums3 = int64(0)
 			detail3 := order_model.GetDetailsByOrderIdAndPid(orderId, item.Prod3)
 			if detail3 != nil && item.Prod3 > 0 && item.Nums3 > 0 {
 				nums3 = int64(detail3.Count / item.Nums3)