- 删除活动补贴商品时,DeleteActStoreSkuBind中特殊处理
This commit is contained in:
@@ -610,10 +610,20 @@ func DeleteActStoreSkuBind(ctx *jxcontext.Context, db *dao.DaoDB, actID int, act
|
|||||||
for storeID := range actStoreSkuMap {
|
for storeID := range actStoreSkuMap {
|
||||||
for _, actStoreSku := range actStoreSkuMap[storeID] {
|
for _, actStoreSku := range actStoreSkuMap[storeID] {
|
||||||
if actStoreSkuParam == nil || actStoreSkuParamMap[jxutils.Combine2Int(actStoreSku.StoreID, actStoreSku.SkuID)] != nil {
|
if actStoreSkuParam == nil || actStoreSkuParamMap[jxutils.Combine2Int(actStoreSku.StoreID, actStoreSku.SkuID)] != nil {
|
||||||
if _, err = dao.UpdateEntityLogically(db, partner.ActStoreSku2ActStoreSkuMap(actStoreSku),
|
if act.Type == model.ActSkuFake {
|
||||||
map[string]interface{}{
|
_, err = dao.DeleteEntityLogically(db, &model.ActStoreSkuMap{}, nil, ctx.GetUserName(),
|
||||||
model.FieldSyncStatus: actStoreSku.SyncStatus | model.SyncFlagDeletedMask,
|
map[string]interface{}{
|
||||||
}, ctx.GetUserName(), nil); err != nil {
|
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
|
return err
|
||||||
}
|
}
|
||||||
isDeleteAtLeastOne = true
|
isDeleteAtLeastOne = true
|
||||||
|
|||||||
Reference in New Issue
Block a user