This commit is contained in:
richboo111
2022-11-03 09:47:17 +08:00
parent c2b03bc76b
commit f51b146831
3 changed files with 139 additions and 125 deletions

View File

@@ -1695,6 +1695,18 @@ func UpdateStoreVendorMap(ctx *jxcontext.Context, db *dao.DaoDB, storeID, vendor
// }
syncStatus |= model.SyncFlagStoreName
}
//增加同步到抖店厂商的同步标志
DDFlag := false
errList := errlist.ErrList{}
if valid["deliveryFeeDeductionSill"] != nil && vendorID == model.VendorIDDD {
DDFlag = true
} //特殊处理抖店运费模板
if DDFlag {
globals.SugarLogger.Debug("进入DDFlag 特殊处理运费模板")
if err := tiktok_store.FreightSpecialTreat(storeMap.VendorOrgCode, utils.Str2Int64(storeMap.VendorStoreID), int64(storeMap.StoreID)); err != nil {
errList.AddErr(fmt.Errorf("抖店运费模板相关处理错误:%v", err))
}
}
for _, v := range [][]string{
[]string{
"pricePercentagePack",
@@ -1774,6 +1786,7 @@ func UpdateStoreVendorMap(ctx *jxcontext.Context, db *dao.DaoDB, storeID, vendor
}
}
dao.Commit(db, txDB)
globals.SugarLogger.Debug("检查一下isStoreMapNeedSync(vendorID, valid)=============%s", isStoreMapNeedSync(vendorID, valid))
if isStoreMapNeedSync(vendorID, valid) {
globals.SugarLogger.Debugf("1.isStoreMapNeedSync(vendorID, valid)=================%v", isStoreMapNeedSync(vendorID, valid))
_, err = CurVendorSync.SyncStore(ctx, db, vendorID, storeID, false, userName)
@@ -1781,7 +1794,7 @@ func UpdateStoreVendorMap(ctx *jxcontext.Context, db *dao.DaoDB, storeID, vendor
}
}
}
return num, err
return num, errors.New(fmt.Sprintf("errList=%v,err=%v", errList, err))
}
func DeleteStore(ctx *jxcontext.Context, storeID int) (num int64, err error) {