...
|
...
|
@@ -279,6 +279,12 @@ func GetRoleList(adminid int64, companyId int64) ([]protocol.RoleGroup, error) { |
|
|
log.Error("getRoleInfoByPid err:%s", err)
|
|
|
return roleGroups, protocol.NewErrWithMessage("1")
|
|
|
}
|
|
|
if v.IsDefault == models.ROLE_DEFAULR {
|
|
|
for i := range roles {
|
|
|
roles[i].InDefaultGroup = 1
|
|
|
}
|
|
|
groups[k].InDefaultGroup = 1
|
|
|
}
|
|
|
rolegroup := protocol.RoleGroup{
|
|
|
RoleInfo: groups[k],
|
|
|
Roles: roles,
|
...
|
...
|
@@ -294,7 +300,7 @@ func getRoleInfoByPid(companyid int64, pid int64) ([]protocol.RoleInfo, error) { |
|
|
)
|
|
|
var (
|
|
|
err error
|
|
|
roles []protocol.RoleInfo
|
|
|
roles = make([]protocol.RoleInfo, 0)
|
|
|
)
|
|
|
err = utils.ExecuteQueryAll(&roles, dataSql, companyid, pid)
|
|
|
return roles, err
|
...
|
...
|
|