绑定银豹平台增加门店前缀
This commit is contained in:
@@ -2882,6 +2882,7 @@ func checkYbParams(db *dao.DaoDB, storeMap *model.StoreMap, storeID int) (err er
|
||||
appID = storeMap.YbAppID
|
||||
appKey = storeMap.YbAppKey
|
||||
yinbaoCookie string
|
||||
storeMap2 *model.StoreMap
|
||||
)
|
||||
if appID == "" {
|
||||
return fmt.Errorf("绑定银豹平台必须输入appID!")
|
||||
@@ -2929,5 +2930,11 @@ func checkYbParams(db *dao.DaoDB, storeMap *model.StoreMap, storeID int) (err er
|
||||
}
|
||||
}
|
||||
}
|
||||
sql := "SELECT * FROM store_map WHERE vendor_id = ? and deleted_at = ? ORDER BY yb_store_prefix DESC LIMIT 1"
|
||||
sqlParams := []interface{}{model.VendorIDYB, utils.DefaultTimeValue}
|
||||
err = dao.GetRow(db, &storeMap2, sql, sqlParams)
|
||||
if err == nil {
|
||||
storeMap.YbStorePrefix = utils.Int64ToStr(utils.Str2Int64(storeMap2.YbStorePrefix) + 1)
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
||||
@@ -423,8 +423,9 @@ type StoreMap struct {
|
||||
|
||||
IsOrder int `orm:"default(0)" json:"isOrder"` //是否是下预订单门店
|
||||
|
||||
YbAppID string `orm:"column(yb_app_id);size(255)" json:"ybAppID"`
|
||||
YbAppKey string `orm:"size(255)" json:"ybAppKey"`
|
||||
YbAppID string `orm:"column(yb_app_id);size(255)" json:"ybAppID"`
|
||||
YbAppKey string `orm:"size(255)" json:"ybAppKey"`
|
||||
YbStorePrefix string `orm:"size(255)" json:"ybStorePrefix"`
|
||||
}
|
||||
|
||||
func (*StoreMap) TableUnique() [][]string {
|
||||
|
||||
Reference in New Issue
Block a user