作者 陈志颖

feat:修改用户管理列表

@@ -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 }
@@ -14,7 +14,7 @@ var KafkaCfg KafkaConfig @@ -14,7 +14,7 @@ var KafkaCfg KafkaConfig
14 14
15 func init() { 15 func init() {
16 KafkaCfg = KafkaConfig{ 16 KafkaCfg = KafkaConfig{
17 - Servers: []string{"127.0.0.1:9092"}, 17 + Servers: []string{"106.52.15.41:9092"},
18 ConsumerId: "partnermg_dev", 18 ConsumerId: "partnermg_dev",
19 } 19 }
20 if os.Getenv("KAFKA_HOST") != "" { 20 if os.Getenv("KAFKA_HOST") != "" {
@@ -183,7 +183,8 @@ func (reponsitory UsersRepository) Find(queryOption domain.UsersFindQuery) (int, @@ -183,7 +183,8 @@ func (reponsitory UsersRepository) Find(queryOption domain.UsersFindQuery) (int,
183 usersReturn = make([]domain.Users, 0) 183 usersReturn = make([]domain.Users, 0)
184 cnt int 184 cnt int
185 ) 185 )
186 - query = query.Order("id DESC") 186 + //query = query.Order("id DESC")
  187 + query = query.Order("admin_type DESC")
187 cnt, err = query.SelectAndCount() 188 cnt, err = query.SelectAndCount()
188 if err != nil { 189 if err != nil {
189 return 0, usersReturn, err 190 return 0, usersReturn, err