This commit is contained in:
suyl
2021-06-18 10:08:49 +08:00
parent a63ac58140
commit 4579a52315

View File

@@ -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
}
}
}