This commit is contained in:
richboo111
2023-03-07 15:01:36 +08:00
parent 2fce73dd58
commit 06d2f62084
7 changed files with 162 additions and 176 deletions

View File

@@ -1527,7 +1527,7 @@ func AddStoreVendorMap(ctx *jxcontext.Context, db *dao.DaoDB, vendorID int, vend
return nil, fmt.Errorf("此平台门店ID已在京西有绑定请先解除绑定平台门店ID :[%v]", storeMap.VendorStoreID)
}
if vendorID == model.VendorIDDD { //抖店绑定店铺时 检查并补充创建
if err2 := tiktok_store.CreateOrUpdateAll(vendorOrgCode, int64(storeMap.StoreID), utils.Str2Int64(storeMap.VendorStoreID), int64(storeMap.DeliveryFeeDeductionFee), utils.Str2Int64(storeMap.YbStorePrefix)); err2 != nil {
if err2 := tiktok_store.CreateOrUpdateAll(vendorOrgCode, int64(storeMap.StoreID), utils.Str2Int64(storeMap.VendorStoreID), int64(storeMap.DeliveryFeeDeductionFee), int64(storeMap.DeliveryFeeDeductionSill), utils.Str2Int64(storeMap.YbStorePrefix), storeMap.YbAppID); err2 != nil {
errList.AddErr(err2)
}
}
@@ -1712,7 +1712,7 @@ func UpdateStoreVendorMap(ctx *jxcontext.Context, db *dao.DaoDB, storeID, vendor
} //特殊处理抖店运费模板、打包费
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), storeMap.YbAppID); err != nil {
if err := tiktok_store.SpecialTreat(storeMap.VendorOrgCode, utils.Str2Int64(storeMap.VendorStoreID), int64(storeMap.StoreID), int64(storeMap.DeliveryFeeDeductionFee), int64(storeMap.DeliveryFeeDeductionSill), utils.Str2Int64(storeMap.YbStorePrefix), storeMap.YbAppID); err != nil {
errList.AddErr(fmt.Errorf("抖店运费模板、起送价、打包费、自动运力设置相关处理错误:%v", err))
}
}
@@ -6132,6 +6132,11 @@ func SetStoreAutoCallRider(vendorOrgCode string, openIDs, closeIDs []int64) (str
return "", nil
}
//操作 freight_template
func ReplaceInsertFreight(storeID, templateID, warehouseID, tradeLimitID int, vendorStoreID, fenceID string) error {
return dao.ReplaceInsertFreight2(storeID, templateID, warehouseID, tradeLimitID, vendorStoreID, fenceID)
}
//辅助函数
func String2ArrayInt64(data string) (retVal []int64) {
temp := strings.Split(data, ",")