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

@@ -254,7 +254,7 @@ func GetFence(appOrgCode string, outFenceID []string) ([]warehouse_getFences_res
}
//特殊处理
func SpecialTreat(vendorOrgCode string, vendorStoreID, storeID, deliveryFeeDeductionFee, minPrice int64, autoCall string) error {
func SpecialTreat(vendorOrgCode string, vendorStoreID, storeID, deliveryFeeDeductionFee, deliveryFeeDeductionSill, minPrice int64, autoCall string) error {
var (
db *dao.DaoDB
errList = errlist.New()
@@ -264,13 +264,14 @@ func SpecialTreat(vendorOrgCode string, vendorStoreID, storeID, deliveryFeeDeduc
}
)
//1.运费模板
bindFreightIDs, err := GetStoreFreight(vendorOrgCode, vendorStoreID)
if err != nil {
globals.SugarLogger.Debug("获取门店(%d) 绑定运费模板出错:", vendorStoreID, err)
//errList.AddErr(fmt.Errorf("获取门店(%d) 绑定运费模板出错:%v", vendorStoreID, err))
}
if bindFreightIDs == 0 { //1未查询到绑定信息不算错误
if freightTemplateID, err := CreateFreightTemplate(int(storeID)); err != nil || freightTemplateID == 0 {
//bindFreightIDs, err := GetStoreFreight(vendorOrgCode, vendorStoreID)
//if err != nil {
// globals.SugarLogger.Debug("获取门店(%d) 绑定运费模板出错:", vendorStoreID, err)
// //errList.AddErr(fmt.Errorf("获取门店(%d) 绑定运费模板出错:%v", vendorStoreID, err))
//}
if true {
//if bindFreightIDs == 0 { //1未查询到绑定信息不算错误
if freightTemplateID, err := CreateFreightTemplate(int(storeID), int(deliveryFeeDeductionSill)); err != nil || freightTemplateID == 0 {
errList.AddErr(fmt.Errorf("创建运费模板失败:%v", err))
} else { //绑定
if err = ShopBindStoreFreight(vendorOrgCode, vendorStoreID, freightTemplateID); err != nil {