新街口
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
package common
|
package common
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"fmt"
|
||||||
"sort"
|
"sort"
|
||||||
|
|
||||||
"git.rosy.net.cn/baseapi/platformapi/autonavi"
|
"git.rosy.net.cn/baseapi/platformapi/autonavi"
|
||||||
@@ -66,8 +67,13 @@ func GetNearSupplyGoodsStoreByStoreID(ctx *jxcontext.Context, storeID int) (stor
|
|||||||
stores []*model.Store
|
stores []*model.Store
|
||||||
db = dao.GetDB()
|
db = dao.GetDB()
|
||||||
)
|
)
|
||||||
stores2, _ := dao.GetStoreList(db, []int{storeID}, nil, nil, nil, "")
|
store2, _ := dao.GetStoreDetail(db, storeID, model.VendorIDJX)
|
||||||
store2 := stores2[0]
|
if store2 == nil {
|
||||||
|
return nil, fmt.Errorf("该门店未绑定京西平台!storeID: %v", storeID)
|
||||||
|
}
|
||||||
|
if store2.IsSupplyGoods == model.YES {
|
||||||
|
return nil, fmt.Errorf("该门店已经是货源门店,无法从其他货源门店进货!storeID: %v", storeID)
|
||||||
|
}
|
||||||
sql := `
|
sql := `
|
||||||
SELECT a.*
|
SELECT a.*
|
||||||
FROM store a
|
FROM store a
|
||||||
|
|||||||
@@ -51,6 +51,7 @@ type StoreDetail struct {
|
|||||||
|
|
||||||
JdStoreLevel string `json:"jdStoreLevel"` //京东门店等级
|
JdStoreLevel string `json:"jdStoreLevel"` //京东门店等级
|
||||||
IsOrder int `json:"isOrder"` //是否是下预订单门店
|
IsOrder int `json:"isOrder"` //是否是下预订单门店
|
||||||
|
IsSupplyGoods int `json:"isSupplyGoods"`
|
||||||
|
|
||||||
YbAppID string `orm:"column(yb_app_id)" json:"ybAppID"`
|
YbAppID string `orm:"column(yb_app_id)" json:"ybAppID"`
|
||||||
YbAppKey string `json:"ybAppKey"`
|
YbAppKey string `json:"ybAppKey"`
|
||||||
|
|||||||
Reference in New Issue
Block a user