- prevent storeID=0 in AddStoreVendorMap

This commit is contained in:
gazebo
2019-02-18 22:01:11 +08:00
parent 89d678f0a4
commit e4f7bf57fe

View File

@@ -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) {
if storeID == 0 {
return nil, fmt.Errorf("storeID不能为0")
}
userName := ctx.GetUserName()
if handler := CurVendorSync.GetStoreHandler(vendorID); handler != nil {
store, err2 := handler.ReadStore(storeMap.VendorStoreID)