1
This commit is contained in:
@@ -14,6 +14,8 @@ import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"git.rosy.net.cn/baseapi/platformapi/sfps2"
|
||||
|
||||
"git.rosy.net.cn/baseapi/platformapi/tao_vegetable"
|
||||
|
||||
"git.rosy.net.cn/jx-callback/business/partner/purchase/mtwm"
|
||||
@@ -789,6 +791,21 @@ func GetVendorStore(ctx *jxcontext.Context, vendorID int, vendorOrgCode, vendorS
|
||||
if vendorID == model.VendorIDJDShop && vendorStoreID == model.JdShopMainVendorStoreID {
|
||||
return nil, err
|
||||
}
|
||||
//绑定顺丰专送门店校验
|
||||
if vendorID == model.VendorIDSFPS {
|
||||
flag := false
|
||||
if store, err := dao.GetStoreDetail(dao.GetDB(), utils.Str2Int(vendorStoreID), 0, ""); err == nil {
|
||||
globals.SugarLogger.Debugf("store.CityName=%s", store.CityName)
|
||||
for k, _ := range sfps2.SFCityStoreIDs {
|
||||
if strings.Contains(store.CityName, k) || store.CityName == k {
|
||||
flag = true
|
||||
}
|
||||
}
|
||||
}
|
||||
if !flag {
|
||||
return nil, errors.New("此门店暂时不在顺丰派送范围,无法绑定")
|
||||
}
|
||||
}
|
||||
if handler := CurVendorSync.GetStoreHandler(vendorID); handler != nil {
|
||||
result, err2 := handler.ReadStore(ctx, vendorOrgCode, vendorStoreID, "")
|
||||
if err = err2; err == nil {
|
||||
|
||||
Reference in New Issue
Block a user