diff --git a/business/jxstore/cms/store.go b/business/jxstore/cms/store.go index 7a9de8878..91033bac0 100644 --- a/business/jxstore/cms/store.go +++ b/business/jxstore/cms/store.go @@ -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)