新街口

This commit is contained in:
苏尹岚
2020-08-06 13:40:47 +08:00
parent 66ddae2162
commit 2e8db13fab
2 changed files with 11 additions and 4 deletions

View File

@@ -1,6 +1,7 @@
package common
import (
"fmt"
"sort"
"git.rosy.net.cn/baseapi/platformapi/autonavi"
@@ -66,8 +67,13 @@ func GetNearSupplyGoodsStoreByStoreID(ctx *jxcontext.Context, storeID int) (stor
stores []*model.Store
db = dao.GetDB()
)
stores2, _ := dao.GetStoreList(db, []int{storeID}, nil, nil, nil, "")
store2 := stores2[0]
store2, _ := dao.GetStoreDetail(db, storeID, model.VendorIDJX)
if store2 == nil {
return nil, fmt.Errorf("该门店未绑定京西平台storeID: %v", storeID)
}
if store2.IsSupplyGoods == model.YES {
return nil, fmt.Errorf("该门店已经是货源门店无法从其他货源门店进货storeID: %v", storeID)
}
sql := `
SELECT a.*
FROM store a

View File

@@ -51,6 +51,7 @@ type StoreDetail struct {
JdStoreLevel string `json:"jdStoreLevel"` //京东门店等级
IsOrder int `json:"isOrder"` //是否是下预订单门店
IsSupplyGoods int `json:"isSupplyGoods"`
YbAppID string `orm:"column(yb_app_id)" json:"ybAppID"`
YbAppKey string `json:"ybAppKey"`