- 非京东平台要求必须自动拣货
This commit is contained in:
@@ -262,11 +262,11 @@ func GetStores(ctx *jxcontext.Context, keyword string, params map[string]interfa
|
||||
panic(r)
|
||||
}
|
||||
}()
|
||||
globals.SugarLogger.Debug(utils.Format4Output(sqlParams, false))
|
||||
globals.SugarLogger.Debug(sql)
|
||||
// globals.SugarLogger.Debug(utils.Format4Output(sqlParams, false))
|
||||
// globals.SugarLogger.Debug(sql)
|
||||
var storeList []*StoreExt
|
||||
if err = dao.GetRows(db, &storeList, sql, sqlParams...); err == nil {
|
||||
globals.SugarLogger.Debugf("GetStores, len(storeList):%d", len(storeList))
|
||||
// globals.SugarLogger.Debugf("GetStores, len(storeList):%d", len(storeList))
|
||||
mapLimit := false
|
||||
var (
|
||||
mapLatitude, mapLongitude float64
|
||||
@@ -564,6 +564,9 @@ func AddStoreVendorMap(ctx *jxcontext.Context, db *dao.DaoDB, storeID, vendorID
|
||||
if storeID == 0 {
|
||||
return nil, fmt.Errorf("storeID不能为0")
|
||||
}
|
||||
if vendorID != model.VendorIDJD && (storeMap.AutoPickup == 0) {
|
||||
return nil, fmt.Errorf("非京东平台要求必须自动拣货")
|
||||
}
|
||||
userName := ctx.GetUserName()
|
||||
if handler := CurVendorSync.GetStoreHandler(vendorID); handler != nil {
|
||||
store, err2 := handler.ReadStore(storeMap.VendorStoreID)
|
||||
@@ -622,6 +625,11 @@ func DeleteStoreVendorMap(ctx *jxcontext.Context, db *dao.DaoDB, storeID, vendor
|
||||
}
|
||||
|
||||
func UpdateStoreVendorMap(ctx *jxcontext.Context, db *dao.DaoDB, storeID, vendorID int, payload map[string]interface{}, userName string) (num int64, err error) {
|
||||
if vendorID != model.VendorIDJD {
|
||||
if autoPickup, ok := payload["autoPickup"]; ok && autoPickup == 0 {
|
||||
return 0, fmt.Errorf("非京东平台要求必须自动拣货")
|
||||
}
|
||||
}
|
||||
storeHandler := CurVendorSync.GetStoreHandler(vendorID)
|
||||
if storeHandler == nil {
|
||||
return 0, ErrCanNotFindVendor
|
||||
|
||||
Reference in New Issue
Block a user