1
This commit is contained in:
@@ -1706,13 +1706,14 @@ func UpdateStoreVendorMap(ctx *jxcontext.Context, db *dao.DaoDB, storeID, vendor
|
||||
//增加同步到抖店厂商的同步标志
|
||||
DDFlag := false
|
||||
errList := errlist.ErrList{}
|
||||
if (valid["deliveryFeeDeductionSill"] != nil || valid["deliveryFeeDeductionFee"] != nil || valid["ybStorePrefix"] != nil) && vendorID == model.VendorIDDD {
|
||||
//deliveryFeeDeductionSill-包邮模板 满x包邮金额 deliveryFeeDeductionFee-打包费 ybStorePrefix-起送价 ybAppID-自动运力设置
|
||||
if (valid["deliveryFeeDeductionSill"] != nil || valid["deliveryFeeDeductionFee"] != nil || valid["ybStorePrefix"] != nil || valid["ybAppID"] != nil) && vendorID == model.VendorIDDD {
|
||||
DDFlag = true
|
||||
} //特殊处理抖店运费模板、打包费
|
||||
if DDFlag {
|
||||
globals.SugarLogger.Debug("进入DDFlag 特殊处理运费模板、起送价、打包费")
|
||||
if err := tiktok_store.SpecialTreat(storeMap.VendorOrgCode, utils.Str2Int64(storeMap.VendorStoreID), int64(storeMap.StoreID), int64(storeMap.DeliveryFeeDeductionFee), utils.Str2Int64(storeMap.YbStorePrefix)); err != nil {
|
||||
errList.AddErr(fmt.Errorf("抖店运费模板、起送价、打包费相关处理错误:%v", err))
|
||||
globals.SugarLogger.Debug("进入DDFlag 特殊处理运费模板、起送价、打包费、自动运力设置")
|
||||
if err := tiktok_store.SpecialTreat(storeMap.VendorOrgCode, utils.Str2Int64(storeMap.VendorStoreID), int64(storeMap.StoreID), int64(storeMap.DeliveryFeeDeductionFee), utils.Str2Int64(storeMap.YbStorePrefix), storeMap.YbAppID); err != nil {
|
||||
errList.AddErr(fmt.Errorf("抖店运费模板、起送价、打包费、自动运力设置相关处理错误:%v", err))
|
||||
}
|
||||
}
|
||||
for _, v := range [][]string{
|
||||
@@ -5967,7 +5968,7 @@ func UpdateStoreRelInformation(ctx *jxcontext.Context) error {
|
||||
FreightTemplate.VendorStoreID = utils.Int64ToStr(m)
|
||||
FreightTemplate.StoreID = utils.Str2Int(n)
|
||||
if _, err := dao.UpdateEntity(db, FreightTemplate, "VendorStoreID", "StoreID", "TemplateID", "WarehouseID", "FenceID", "TradeLimitID"); err != nil {
|
||||
if err1 := dao.CreateEntity(db, FreightTemplate); err1 != nil {
|
||||
if err1 := dao.CreateEntity(db, FreightTemplate); dao.IsDuplicateError(err1) || err1 != nil {
|
||||
errList.AddErr(fmt.Errorf("创建操作,同步进数据库错误信息:%v", err1))
|
||||
} else {
|
||||
errList.AddErr(fmt.Errorf("更新操作,同步进数据库错误信息:%v", err))
|
||||
@@ -6045,7 +6046,9 @@ func AssistCreateFence(relInfo map[string][]tiktok_store.RelInfo) (string, error
|
||||
}
|
||||
}
|
||||
endStr = tStr1 + "," + tStr2
|
||||
globals.SugarLogger.Debugf("京西平台没有配送范围的门店ID=%s", endStr)
|
||||
if len(endStr) > 0 {
|
||||
globals.SugarLogger.Debugf("京西平台没有配送范围的门店ID=%s", endStr)
|
||||
}
|
||||
}
|
||||
if bindFence, err := tiktok_store.GetWarehouseByStore(k, utils.Str2Int64(i.VendorStoreID)); err == nil && (len(bindFence) > 0 && len(bindFence[i.VendorStoreID][0].OutFenceIds) > 0) {
|
||||
tempFenceID = bindFence[i.VendorStoreID][0].OutFenceIds[0]
|
||||
@@ -6062,7 +6065,7 @@ func AssistCreateFence(relInfo map[string][]tiktok_store.RelInfo) (string, error
|
||||
}
|
||||
}
|
||||
}
|
||||
if err := dao.CreateEntity(db, FreightTemplate); err != nil {
|
||||
if err := dao.CreateEntity(db, FreightTemplate); dao.IsDuplicateError(err) || err != nil {
|
||||
if _, err1 := dao.UpdateEntity(db, FreightTemplate, "FenceID"); err1 != nil {
|
||||
globals.SugarLogger.Debugf("db update storeID,vendorStoreID defeat on :%v", err1)
|
||||
//errList.AddErr(fmt.Errorf("更新操作,同步进数据库错误信息:%v", err1))
|
||||
|
||||
Reference in New Issue
Block a user