1
This commit is contained in:
@@ -4,6 +4,7 @@ import (
|
|||||||
"bytes"
|
"bytes"
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"errors"
|
"errors"
|
||||||
|
"git.rosy.net.cn/jx-callback/business/authz/autils"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"git.rosy.net.cn/baseapi/platformapi/mtwmapi"
|
"git.rosy.net.cn/baseapi/platformapi/mtwmapi"
|
||||||
@@ -154,6 +155,10 @@ func (c *StoreController) CreateStore() {
|
|||||||
store := &cms.StoreExt{}
|
store := &cms.StoreExt{}
|
||||||
if err = utils.UnmarshalUseNumber([]byte(params.Payload), store); err == nil {
|
if err = utils.UnmarshalUseNumber([]byte(params.Payload), store); err == nil {
|
||||||
retVal, err = cms.CreateStore(params.Ctx, store, params.Ctx.GetUserName())
|
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
|
return retVal, "", err
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user