|
@@ -280,7 +280,13 @@ func (service UsersService) GetUserList(queryOption query.UserListQuery) (int, [ |
|
@@ -280,7 +280,13 @@ func (service UsersService) GetUserList(queryOption query.UserListQuery) (int, [ |
280
|
return cnt, result, nil
|
280
|
return cnt, result, nil
|
281
|
}
|
281
|
}
|
282
|
|
282
|
|
283
|
-//buildGetUserList 组装构建前端需要的用户列表数据
|
283
|
+/**
|
|
|
284
|
+ * @Author SteveChan
|
|
|
285
|
+ * @Description // 组装构建前端需要的用户列表数据
|
|
|
286
|
+ * @Date 00:22 2021/1/8
|
|
|
287
|
+ * @Param
|
|
|
288
|
+ * @return
|
|
|
289
|
+ **/
|
284
|
func (service UsersService) buildGetUserList(usersData []domain.Users, permissionData []domain.AdminPermission) []map[string]interface{} {
|
290
|
func (service UsersService) buildGetUserList(usersData []domain.Users, permissionData []domain.AdminPermission) []map[string]interface{} {
|
285
|
result := make([]map[string]interface{}, 0, len(usersData))
|
291
|
result := make([]map[string]interface{}, 0, len(usersData))
|
286
|
permissionMap := map[int64]domain.AdminPermission{}
|
292
|
permissionMap := map[int64]domain.AdminPermission{}
|
|
@@ -313,9 +319,11 @@ func (service UsersService) buildGetUserList(usersData []domain.Users, permissio |
|
@@ -313,9 +319,11 @@ func (service UsersService) buildGetUserList(usersData []domain.Users, permissio |
313
|
"permission": permissionTypes,
|
319
|
"permission": permissionTypes,
|
314
|
"isAdmin": 0,
|
320
|
"isAdmin": 0,
|
315
|
"partnership": len(usersData[i].AccessPartners),
|
321
|
"partnership": len(usersData[i].AccessPartners),
|
|
|
322
|
+ "isSenior": usersData[i].IsSenior,
|
316
|
}
|
323
|
}
|
317
|
if usersData[i].IsSuperAdmin() {
|
324
|
if usersData[i].IsSuperAdmin() {
|
318
|
m["isAdmin"] = 1
|
325
|
m["isAdmin"] = 1
|
|
|
326
|
+ m["name"] = m["name"].(string) + "(管理员)"
|
319
|
}
|
327
|
}
|
320
|
result = append(result, m)
|
328
|
result = append(result, m)
|
321
|
}
|
329
|
}
|