diff --git a/business/jxstore/act/act.go b/business/jxstore/act/act.go index ddc6b3ff2..532444d0e 100644 --- a/business/jxstore/act/act.go +++ b/business/jxstore/act/act.go @@ -672,10 +672,10 @@ func CreateActForMtByOrder(ctx *jxcontext.Context, act *model.Act, vendorID int, for _, storeSkus := range actStoreSkuMap { for i := 0; i < len(storeSkus)-1; i++ { for j := 0; j < len(storeSkus)-i-1; j++ { - if storeSkus[j].MtwmPrice < storeSkus[j+1].MtwmPrice { - temp := storeSkus[j].MtwmPrice - storeSkus[j].MtwmPrice = storeSkus[j+1].MtwmPrice - storeSkus[j+1].MtwmPrice = temp + if storeSkus[j].MtwmPrice > storeSkus[j+1].MtwmPrice { + temp := storeSkus[j] + storeSkus[j] = storeSkus[j+1] + storeSkus[j+1] = temp } } }