1
This commit is contained in:
@@ -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 (
|
||||
db *dao.DaoDB
|
||||
errList = errlist.New()
|
||||
@@ -292,16 +292,19 @@ func SpecialTreat(vendorOrgCode string, vendorStoreID, storeID, deliveryFeeDeduc
|
||||
}
|
||||
//3.设置门店起送价 默认为0
|
||||
if bindSaleLimitID, err := GetStoreSaleLimit(vendorOrgCode, vendorStoreID); err != nil {
|
||||
globals.SugarLogger.Debugf("进入获取门店起送价限售模板")
|
||||
errList.AddErr(fmt.Errorf("获取门店限售模板失败:%v", err))
|
||||
} else {
|
||||
if bindSaleLimitID == 0 || utils.IsNil(bindSaleLimitID) { //创建
|
||||
if createSaleLimitID, err := CreateAndBindMinPriceTemplate(vendorOrgCode, vendorStoreID, minPrice); err != nil {
|
||||
globals.SugarLogger.Debugf("进入创建门店起送价限售模板,minPrice=======%d", minPrice)
|
||||
errList.AddErr(fmt.Errorf("设置门店起送价限售模板失败:%v", err))
|
||||
} else {
|
||||
FreightTemplate.TradeLimitID = createSaleLimitID
|
||||
}
|
||||
} else { //更新为起送价模板
|
||||
if updateSaleLimitID, err := UpdateTradeLimitTemplate(vendorOrgCode, bindSaleLimitID, minPrice); err != nil {
|
||||
globals.SugarLogger.Debugf("进入更新门店起送价限售模板,minPrice=======%d", minPrice)
|
||||
errList.AddErr(fmt.Errorf("更新门店起送价限售模板失败:%v", err))
|
||||
} else {
|
||||
FreightTemplate.TradeLimitID = updateSaleLimitID
|
||||
|
||||
Reference in New Issue
Block a user