...
|
...
|
@@ -179,17 +179,21 @@ func RoleGroupDelete(param protocol.RequestRoleDelete) error { |
|
|
return nil
|
|
|
}
|
|
|
|
|
|
func GetRoleList(companyId int64) ([]protocol.RoleGroup, error) {
|
|
|
//GetRoleList 获取角色列表
|
|
|
func GetRoleList(adminid int64, companyId int64) ([]protocol.RoleGroup, error) {
|
|
|
var (
|
|
|
roleGroups []protocol.RoleGroup
|
|
|
err error
|
|
|
groups []protocol.RoleInfo
|
|
|
// companyinfo *models.Company
|
|
|
)
|
|
|
// models.GetCompanyById(companyId)
|
|
|
groups, err = getRoleGroupByCompany(companyId)
|
|
|
if err != nil {
|
|
|
log.Error("getRoleGroupByCompany err:%s", err)
|
|
|
return roleGroups, protocol.NewErrWithMessage("1")
|
|
|
}
|
|
|
|
|
|
for k, v := range groups {
|
|
|
var roles []protocol.RoleInfo
|
|
|
roles, err = getRoleInfoByPid(companyId, v.Id)
|
...
|
...
|
|