- prevent storeID=0 in AddStoreVendorMap
This commit is contained in:
@@ -428,6 +428,9 @@ func GetStoreVendorMaps(ctx *jxcontext.Context, db *dao.DaoDB, storeID int, vend
|
|||||||
}
|
}
|
||||||
|
|
||||||
func AddStoreVendorMap(ctx *jxcontext.Context, db *dao.DaoDB, storeID, vendorID int, storeMap *model.StoreMap) (outStoreMap *model.StoreMap, err error) {
|
func AddStoreVendorMap(ctx *jxcontext.Context, db *dao.DaoDB, storeID, vendorID int, storeMap *model.StoreMap) (outStoreMap *model.StoreMap, err error) {
|
||||||
|
if storeID == 0 {
|
||||||
|
return nil, fmt.Errorf("storeID不能为0")
|
||||||
|
}
|
||||||
userName := ctx.GetUserName()
|
userName := ctx.GetUserName()
|
||||||
if handler := CurVendorSync.GetStoreHandler(vendorID); handler != nil {
|
if handler := CurVendorSync.GetStoreHandler(vendorID); handler != nil {
|
||||||
store, err2 := handler.ReadStore(storeMap.VendorStoreID)
|
store, err2 := handler.ReadStore(storeMap.VendorStoreID)
|
||||||
|
|||||||
Reference in New Issue
Block a user