将京西菜市名字(及其它一些硬编码)做成配置项目

This commit is contained in:
gazebo
2020-02-18 19:11:47 +08:00
parent ae2056c64e
commit b935ef3462
12 changed files with 46 additions and 34 deletions

View File

@@ -20,10 +20,6 @@ import (
"git.rosy.net.cn/jx-callback/globals/api"
)
const (
VendorStorePrefix = "京西菜市"
)
type tJdStoreInfo struct {
model.Store
VendorOrgCode string `orm:"size(32)" json:"vendorOrgCode"` // 同一平台下不同的商户代码,如果只有一个,可以为空
@@ -66,7 +62,7 @@ func (p *PurchaseHandler) ReadStore(ctx *jxcontext.Context, vendorOrgCode, vendo
retVal.IsAutoOrder = -1
}
retVal.OriginalName = result.StationName
_, retVal.Name = jxutils.SplitStoreName(retVal.OriginalName, partner.StoreNameSeparator, VendorStorePrefix)
_, retVal.Name = jxutils.SplitStoreName(retVal.OriginalName, partner.StoreNameSeparator, globals.StoreName)
retVal.DeliveryType = JdDeliveryType2Jx(result.CarrierNo)
tel2 := result.Mobile