From 3297672751384f08ad22268fec24e45e9a23f8d5 Mon Sep 17 00:00:00 2001 From: suyl <770236076@qq.com> Date: Tue, 1 Jun 2021 16:05:24 +0800 Subject: [PATCH] aa --- business/jxstore/cms/store.go | 4 ++++ 1 file changed, 4 insertions(+) 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, "", "")