1
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user