diff --git a/business/jxstore/cms/store.go b/business/jxstore/cms/store.go index 92658c375..66f267f49 100644 --- a/business/jxstore/cms/store.go +++ b/business/jxstore/cms/store.go @@ -1235,6 +1235,10 @@ func CreateStoreByUser(ctx *jxcontext.Context, mobile string) (id int, err error store.StoreLevel = "C" } dao.WrapAddIDCULDEntity(store, ctx.GetUserName()) + storeList, _ := dao.GetStoreList(db, nil, nil, nil, nil, []string{mobile}, "") + if len(storeList) > 0 { + return 0, fmt.Errorf("此电话已有门店了![%v]", mobile) + } if err = dao.CreateEntity(db, store); err == nil { if globals.IsAddEvent { err = AddEventDetail(db, ctx, model.OperateAdd, store.ID, model.ThingTypeStore, store.ID, "", "")