数智豫电获取用户信息

  1. @Autowired
  2. private IUserClient userClient;
  3. ResponseEntity<UserDeptDTO> userById = userClient.getUserById(createUser);
  4. userValue.setUserName(userById.getBody().getName());
  5. userValue.setLoginName(userById.getBody().getLogin());
  6. UserDeptDTO userDeptDTO = userClient.getUserById(userValue.getUserId()).getBody();
  7. UserDeptDTO body = userClient.getUserById(blogExportDTO.getUserId()).getBody();
  8. userBlogExportDTO.setUserName(body.getName());
  9. userBlogExportDTO.setHeaderImage(body.getImageUrl());
  10. userBlogExportDTO.setUserId(blogExportDTO.getUserId());
  11. userBlogExportDTO.setGrade(blogExportDTO.getGrade());
  12. userBlogExportDTO.setIntegral(blogExportDTO.getIntegral());
  13. userBlogExportDTO.setFansCount(blogExportDTO.getFansCount());
  14. userBlogExportDTO.setBlogCount(blogExportDTO.getBlogCount());
  15. userBlogExportDTO.setRanking(list.indexOf(blogExportDTO)+1);
  16. //用户头像信息
  17. ResponseEntity<List<User>> responseEntity = userClient.getUserListByIds(commentUserIdSet);
  18. Map<Long, User> userMap = responseEntity.getBody().parallelStream().collect(Collectors.toMap(user -> Long.valueOf(user.getId()), user -> user));

数据库表字段

  1. alter table inv_question
  2. add create_user bigint null comment '创建人';
  3. alter table inv_question
  4. add create_time datetime null comment '创建时间';
  5. alter table inv_question
  6. add update_user bigint null comment '更新人';
  7. alter table inv_question
  8. add update_time datetime null comment '更新时间';
  9. alter table inv_question
  10. add is_top int null comment '是否置顶,0默认;1置顶;' after status;
  11. alter table inv_question
  12. modify collection_count int null comment '收藏计数' after update_time;

Build对象

类.build.xxxxx.build()

创建空集合

Collections.emptyList()
Collections.emptySet()
Collections.emptyMap()