1
This commit is contained in:
@@ -4,6 +4,7 @@ import (
|
||||
"bytes"
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"git.rosy.net.cn/jx-callback/business/authz/autils"
|
||||
"strings"
|
||||
|
||||
"git.rosy.net.cn/baseapi/platformapi/mtwmapi"
|
||||
@@ -154,6 +155,10 @@ func (c *StoreController) CreateStore() {
|
||||
store := &cms.StoreExt{}
|
||||
if err = utils.UnmarshalUseNumber([]byte(params.Payload), store); err == nil {
|
||||
retVal, err = cms.CreateStore(params.Ctx, store, params.Ctx.GetUserName())
|
||||
// 将创建门店用户添加到管理组
|
||||
if retVal != 0 {
|
||||
cms.AddUsers4Role(params.Ctx, autils.NewRole("StoreBoss", retVal.(int)), []string{params.Ctx.GetUserID()})
|
||||
}
|
||||
}
|
||||
return retVal, "", err
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user