This commit is contained in:
suyl
2021-06-01 16:05:24 +08:00
parent 588a2a1f72
commit 3297672751

View File

@@ -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, "", "")