- DeleteActStoreSkuBind中,对于取消活动(actStoreSkuParam为nil)删除活动商品

This commit is contained in:
gazebo
2019-07-12 17:21:38 +08:00
parent 25f078d5f1
commit cde87bb667

View File

@@ -580,6 +580,7 @@ func DeleteActStoreSkuBind(ctx *jxcontext.Context, db *dao.DaoDB, actID int, act
for vendorID, act := range actMap { for vendorID, act := range actMap {
isDeleteAll := true isDeleteAll := true
isDeleteAtLeastOne := false isDeleteAtLeastOne := false
if actStoreSkuParam != nil {
actStoreSkuMap := partner.SplitActStoreSku(actStoreSkuMap[vendorID]) actStoreSkuMap := partner.SplitActStoreSku(actStoreSkuMap[vendorID])
for storeID := range actStoreSkuMap { for storeID := range actStoreSkuMap {
for _, actStoreSku := range actStoreSkuMap[storeID] { for _, actStoreSku := range actStoreSkuMap[storeID] {
@@ -597,6 +598,10 @@ func DeleteActStoreSkuBind(ctx *jxcontext.Context, db *dao.DaoDB, actID int, act
} }
} }
} }
} else {
isDeleteAll = true
isDeleteAtLeastOne = true
}
if isDeleteAll || isDeleteAtLeastOne { if isDeleteAll || isDeleteAtLeastOne {
syncStatus := model.SyncFlagModifiedMask syncStatus := model.SyncFlagModifiedMask
if isDeleteAll { if isDeleteAll {