Przeglądaj źródła

promotion for go 9

abiao 2 lat temu
rodzic
commit
5cfd26329d

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

@@ -288,7 +288,7 @@ func SetOrderPromotionPro(orderId string, wxUid int64) {
 			}
 		}
 		if item.MinTotal > 0 {
-			nums4 = int64(order.TotalPrice / item.MinTotal)
+			nums4 = int64((order.TotalPrice - noInvovedAmount) / item.MinTotal)
 		}
 
 		if item.Prod4 > 0 {

+ 1 - 1
go/gopath/src/fohow.com/apps/models/order_model/order.go

@@ -945,7 +945,7 @@ func GetNotInvovedAmount(promotionId int64, orderId string) int64 {
 		item_pd := product_model.GetProductById(item.ProductId, true)
 		total += item.Nums * item_pd.Price
 	}
-	beego.BeeLogger.Error("GetNotInvovedAmount-total-%d", total)
+	beego.BeeLogger.Info("GetNotInvovedAmount--promotionId--%d-total-%d", promotionId, total)
 	return total
 }