1
This commit is contained in:
@@ -1709,7 +1709,7 @@ func UpdateStoreVendorMap(ctx *jxcontext.Context, db *dao.DaoDB, storeID, vendor
|
|||||||
globals.SugarLogger.Debugf("ddflag=========%v", DDFlag)
|
globals.SugarLogger.Debugf("ddflag=========%v", DDFlag)
|
||||||
if DDFlag {
|
if DDFlag {
|
||||||
globals.SugarLogger.Debug("进入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), userName); err != nil {
|
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))
|
errList.AddErr(fmt.Errorf("抖店运费模板、起送价、打包费相关处理错误:%v", err))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -253,7 +253,7 @@ func GetFence(appOrgCode string, outFenceID []string) ([]warehouse_getFences_res
|
|||||||
}
|
}
|
||||||
|
|
||||||
//特殊处理
|
//特殊处理
|
||||||
func SpecialTreat(vendorOrgCode string, vendorStoreID, storeID, deliveryFeeDeductionFee, minPrice int64, userName string) error {
|
func SpecialTreat(vendorOrgCode string, vendorStoreID, storeID, deliveryFeeDeductionFee, minPrice int64) error {
|
||||||
var (
|
var (
|
||||||
db *dao.DaoDB
|
db *dao.DaoDB
|
||||||
errList = errlist.New()
|
errList = errlist.New()
|
||||||
@@ -292,16 +292,19 @@ func SpecialTreat(vendorOrgCode string, vendorStoreID, storeID, deliveryFeeDeduc
|
|||||||
}
|
}
|
||||||
//3.设置门店起送价 默认为0
|
//3.设置门店起送价 默认为0
|
||||||
if bindSaleLimitID, err := GetStoreSaleLimit(vendorOrgCode, vendorStoreID); err != nil {
|
if bindSaleLimitID, err := GetStoreSaleLimit(vendorOrgCode, vendorStoreID); err != nil {
|
||||||
|
globals.SugarLogger.Debugf("进入获取门店起送价限售模板")
|
||||||
errList.AddErr(fmt.Errorf("获取门店限售模板失败:%v", err))
|
errList.AddErr(fmt.Errorf("获取门店限售模板失败:%v", err))
|
||||||
} else {
|
} else {
|
||||||
if bindSaleLimitID == 0 || utils.IsNil(bindSaleLimitID) { //创建
|
if bindSaleLimitID == 0 || utils.IsNil(bindSaleLimitID) { //创建
|
||||||
if createSaleLimitID, err := CreateAndBindMinPriceTemplate(vendorOrgCode, vendorStoreID, minPrice); err != nil {
|
if createSaleLimitID, err := CreateAndBindMinPriceTemplate(vendorOrgCode, vendorStoreID, minPrice); err != nil {
|
||||||
|
globals.SugarLogger.Debugf("进入创建门店起送价限售模板,minPrice=======%d", minPrice)
|
||||||
errList.AddErr(fmt.Errorf("设置门店起送价限售模板失败:%v", err))
|
errList.AddErr(fmt.Errorf("设置门店起送价限售模板失败:%v", err))
|
||||||
} else {
|
} else {
|
||||||
FreightTemplate.TradeLimitID = createSaleLimitID
|
FreightTemplate.TradeLimitID = createSaleLimitID
|
||||||
}
|
}
|
||||||
} else { //更新为起送价模板
|
} else { //更新为起送价模板
|
||||||
if updateSaleLimitID, err := UpdateTradeLimitTemplate(vendorOrgCode, bindSaleLimitID, minPrice); err != nil {
|
if updateSaleLimitID, err := UpdateTradeLimitTemplate(vendorOrgCode, bindSaleLimitID, minPrice); err != nil {
|
||||||
|
globals.SugarLogger.Debugf("进入更新门店起送价限售模板,minPrice=======%d", minPrice)
|
||||||
errList.AddErr(fmt.Errorf("更新门店起送价限售模板失败:%v", err))
|
errList.AddErr(fmt.Errorf("更新门店起送价限售模板失败:%v", err))
|
||||||
} else {
|
} else {
|
||||||
FreightTemplate.TradeLimitID = updateSaleLimitID
|
FreightTemplate.TradeLimitID = updateSaleLimitID
|
||||||
|
|||||||
Reference in New Issue
Block a user