aa
This commit is contained in:
@@ -1235,6 +1235,10 @@ func CreateStoreByUser(ctx *jxcontext.Context, mobile string) (id int, err error
|
|||||||
store.StoreLevel = "C"
|
store.StoreLevel = "C"
|
||||||
}
|
}
|
||||||
dao.WrapAddIDCULDEntity(store, ctx.GetUserName())
|
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 err = dao.CreateEntity(db, store); err == nil {
|
||||||
if globals.IsAddEvent {
|
if globals.IsAddEvent {
|
||||||
err = AddEventDetail(db, ctx, model.OperateAdd, store.ID, model.ThingTypeStore, store.ID, "", "")
|
err = AddEventDetail(db, ctx, model.OperateAdd, store.ID, model.ThingTypeStore, store.ID, "", "")
|
||||||
|
|||||||
Reference in New Issue
Block a user