|
|
@@ -10,8 +10,7 @@ import (
|
|
|
//发放促销商品
|
|
|
func SetOrderPromotion(orderId string, wxUid int64) {
|
|
|
beego.BeeLogger.Warn("******* SetOrderPromotion orderId:%s wxUid:%d", orderId, wxUid)
|
|
|
- firstFlag := true
|
|
|
- totalFlag := true
|
|
|
+
|
|
|
firstOrder := false
|
|
|
//获取订单明细
|
|
|
order := order_model.GetOrderById(orderId, false)
|
|
|
@@ -28,6 +27,8 @@ func SetOrderPromotion(orderId string, wxUid int64) {
|
|
|
// 获取所有有效促销记录
|
|
|
effectivePromotions := order_model.GetEffetivePromotions(queryDate, order.OrderType, false)
|
|
|
for _, item := range effectivePromotions {
|
|
|
+ firstFlag := true
|
|
|
+ totalFlag := true
|
|
|
if item.MaxTotal > 0 && order.TotalPrice > item.MaxTotal {
|
|
|
totalFlag = false
|
|
|
continue
|