This commit is contained in:
邹宗楠
2025-08-19 11:39:40 +08:00
parent 225777405c
commit 5037da9b31
2 changed files with 3 additions and 11 deletions

View File

@@ -1020,7 +1020,6 @@ func CancelAct(ctx *jxcontext.Context, actID int) (err error) {
// actStoreSkuParam为空不会删除act_store_sku但会删除act_store_sku_map
func DeleteActStoreSkuBind(ctx *jxcontext.Context, db *dao.DaoDB, actID int, actStoreSkuParam []*ActStoreSkuParam) (originSyncStatus int8, err error) {
globals.SugarLogger.Debugf("-----actStoreSkuParam- := %s", utils.Format4Output(actStoreSkuParam, false))
actMap, err := dao.GetActVendorInfo(db, actID, nil)
if err != nil {
return 0, err
@@ -1074,7 +1073,6 @@ func DeleteActStoreSkuBind(ctx *jxcontext.Context, db *dao.DaoDB, actID int, act
}
}
isNeedCancelAct := true
globals.SugarLogger.Debugf("-----actStoreSkuParamMap- := %s", utils.Format4Output(actStoreSkuParamMap, false))
for vendorID, act := range actMap {
originSyncStatus |= act.SyncStatus
isDeleteAll := true
@@ -1083,9 +1081,7 @@ func DeleteActStoreSkuBind(ctx *jxcontext.Context, db *dao.DaoDB, actID int, act
actStoreSkuMap := partner.SplitActStoreSku(actStoreSkuMap[vendorID])
for storeID := range actStoreSkuMap {
for _, actStoreSku := range actStoreSkuMap[storeID] {
globals.SugarLogger.Debugf("---------bool := %v", actStoreSkuParam == nil || actStoreSkuParamMap[jxutils.Combine2Int(actStoreSku.StoreID, actStoreSku.SkuID)] != nil)
if actStoreSkuParam == nil || actStoreSkuParamMap[jxutils.Combine2Int(actStoreSku.StoreID, actStoreSku.SkuID)] != nil {
globals.SugarLogger.Debugf("---------act Type:= %d", act.Type)
if act.Type == model.ActSkuFake {
_, err = dao.DeleteEntityLogically(db, &model.ActStoreSkuMap{}, nil, ctx.GetUserName(),
map[string]interface{}{
@@ -1113,8 +1109,6 @@ func DeleteActStoreSkuBind(ctx *jxcontext.Context, db *dao.DaoDB, actID int, act
isDeleteAll = true
isDeleteAtLeastOne = true
}
globals.SugarLogger.Debugf("---------act isDeleteAll:= %v", isDeleteAtLeastOne)
globals.SugarLogger.Debugf("---------act isDeleteAtLeastOne:= %v", isDeleteAtLeastOne)
if isDeleteAll || isDeleteAtLeastOne {
syncStatus := int8(model.SyncFlagModifiedMask)
if isDeleteAll {