This commit is contained in:
suyl
2021-07-20 10:12:07 +08:00
parent 1bb6c86b4a
commit 2608d1ed2f

View File

@@ -1021,6 +1021,7 @@ 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 {
fmt.Println("222222222222222222222222222", utils.Format4Output(act, true))
if act.Type == model.ActSkuFake {
_, err = dao.DeleteEntityLogically(db, &model.ActStoreSkuMap{}, nil, ctx.GetUserName(),
map[string]interface{}{
@@ -1029,7 +1030,6 @@ func DeleteActStoreSkuBind(ctx *jxcontext.Context, db *dao.DaoDB, actID int, act
model.FieldSkuID: actStoreSku.SkuID,
})
} else {
fmt.Println("2222222222222222222222222222222222222222222")
_, err = dao.UpdateEntityLogically(db, partner.ActStoreSku2ActStoreSkuMap(actStoreSku),
map[string]interface{}{
model.FieldSyncStatus: actStoreSku.SyncStatus | model.SyncFlagDeletedMask,
@@ -1049,8 +1049,8 @@ func DeleteActStoreSkuBind(ctx *jxcontext.Context, db *dao.DaoDB, actID int, act
isDeleteAll = true
isDeleteAtLeastOne = true
}
fmt.Println("111111111111111111111111", isDeleteAll, isDeleteAtLeastOne)
if isDeleteAll || isDeleteAtLeastOne {
fmt.Println("1111111111111111111111111111111111111111111111")
syncStatus := int8(model.SyncFlagModifiedMask)
if isDeleteAll {
syncStatus = model.SyncFlagDeletedMask