diff --git a/business/jxstore/act/act.go b/business/jxstore/act/act.go index 44c15ea5c..f42483e62 100644 --- a/business/jxstore/act/act.go +++ b/business/jxstore/act/act.go @@ -610,10 +610,20 @@ func DeleteActStoreSkuBind(ctx *jxcontext.Context, db *dao.DaoDB, actID int, act for storeID := range actStoreSkuMap { for _, actStoreSku := range actStoreSkuMap[storeID] { if actStoreSkuParam == nil || actStoreSkuParamMap[jxutils.Combine2Int(actStoreSku.StoreID, actStoreSku.SkuID)] != nil { - if _, err = dao.UpdateEntityLogically(db, partner.ActStoreSku2ActStoreSkuMap(actStoreSku), - map[string]interface{}{ - model.FieldSyncStatus: actStoreSku.SyncStatus | model.SyncFlagDeletedMask, - }, ctx.GetUserName(), nil); err != nil { + if act.Type == model.ActSkuFake { + _, err = dao.DeleteEntityLogically(db, &model.ActStoreSkuMap{}, nil, ctx.GetUserName(), + map[string]interface{}{ + model.FieldActID: actID, + model.FieldStoreID: actStoreSku.StoreID, + model.FieldSkuID: actStoreSku.SkuID, + }) + } else { + _, err = dao.UpdateEntityLogically(db, partner.ActStoreSku2ActStoreSkuMap(actStoreSku), + map[string]interface{}{ + model.FieldSyncStatus: actStoreSku.SyncStatus | model.SyncFlagDeletedMask, + }, ctx.GetUserName(), nil) + } + if err != nil { return err } isDeleteAtLeastOne = true