...
|
...
|
@@ -280,7 +280,13 @@ func (service UsersService) GetUserList(queryOption query.UserListQuery) (int, [ |
|
|
return cnt, result, nil
|
|
|
}
|
|
|
|
|
|
//buildGetUserList 组装构建前端需要的用户列表数据
|
|
|
/**
|
|
|
* @Author SteveChan
|
|
|
* @Description // 组装构建前端需要的用户列表数据
|
|
|
* @Date 00:22 2021/1/8
|
|
|
* @Param
|
|
|
* @return
|
|
|
**/
|
|
|
func (service UsersService) buildGetUserList(usersData []domain.Users, permissionData []domain.AdminPermission) []map[string]interface{} {
|
|
|
result := make([]map[string]interface{}, 0, len(usersData))
|
|
|
permissionMap := map[int64]domain.AdminPermission{}
|
...
|
...
|
@@ -313,9 +319,11 @@ func (service UsersService) buildGetUserList(usersData []domain.Users, permissio |
|
|
"permission": permissionTypes,
|
|
|
"isAdmin": 0,
|
|
|
"partnership": len(usersData[i].AccessPartners),
|
|
|
"isSenior": usersData[i].IsSenior,
|
|
|
}
|
|
|
if usersData[i].IsSuperAdmin() {
|
|
|
m["isAdmin"] = 1
|
|
|
m["name"] = m["name"].(string) + "(管理员)"
|
|
|
}
|
|
|
result = append(result, m)
|
|
|
}
|
...
|
...
|
|