...
|
...
|
@@ -424,22 +424,25 @@ func (usersService *UsersService) SelectorCompanyRole(selectorQuery *query.Compa |
|
|
selectorQuery.Operator.OrgId,
|
|
|
selectorQuery.Operator.UserId)
|
|
|
result, err := creationUserGateway.RoleSearch(allied_creation_user.ReqRoleSearch{
|
|
|
Limit: selectorQuery.PageSize,
|
|
|
Offset: (selectorQuery.PageNumber - 1) * selectorQuery.PageSize,
|
|
|
Limit: selectorQuery.PageSize,
|
|
|
Offset: (selectorQuery.PageNumber - 1) * selectorQuery.PageSize,
|
|
|
RoleName: selectorQuery.RoleName,
|
|
|
})
|
|
|
if err != nil {
|
|
|
return 0, nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error())
|
|
|
}
|
|
|
var (
|
|
|
dataList []dto.UserOrg
|
|
|
// item dto.UserOrg
|
|
|
dataList []dto.UserRole
|
|
|
item dto.UserRole
|
|
|
)
|
|
|
// for _, v := range result.Orgs {
|
|
|
// item = dto.UserOrg{
|
|
|
// OrgID: strconv.Itoa(v.OrgID),
|
|
|
// OrgName: v.OrgName,
|
|
|
// }
|
|
|
// dataList = append(dataList, item)
|
|
|
// }
|
|
|
for _, v := range result.Roles {
|
|
|
item = dto.UserRole{
|
|
|
RoleID: strconv.Itoa(v.RoleID),
|
|
|
RoleName: v.RoleName,
|
|
|
OrgName: v.Ext.OrgName,
|
|
|
Descript: v.Desc,
|
|
|
}
|
|
|
dataList = append(dataList, item)
|
|
|
}
|
|
|
return int64(result.Count), dataList, nil
|
|
|
} |
...
|
...
|
|