数智豫电获取用户信息
@Autowired
private IUserClient userClient;
ResponseEntity<UserDeptDTO> userById = userClient.getUserById(createUser);
userValue.setUserName(userById.getBody().getName());
userValue.setLoginName(userById.getBody().getLogin());
UserDeptDTO userDeptDTO = userClient.getUserById(userValue.getUserId()).getBody();
UserDeptDTO body = userClient.getUserById(blogExportDTO.getUserId()).getBody();
userBlogExportDTO.setUserName(body.getName());
userBlogExportDTO.setHeaderImage(body.getImageUrl());
userBlogExportDTO.setUserId(blogExportDTO.getUserId());
userBlogExportDTO.setGrade(blogExportDTO.getGrade());
userBlogExportDTO.setIntegral(blogExportDTO.getIntegral());
userBlogExportDTO.setFansCount(blogExportDTO.getFansCount());
userBlogExportDTO.setBlogCount(blogExportDTO.getBlogCount());
userBlogExportDTO.setRanking(list.indexOf(blogExportDTO)+1);
//用户头像信息
ResponseEntity<List<User>> responseEntity = userClient.getUserListByIds(commentUserIdSet);
Map<Long, User> userMap = responseEntity.getBody().parallelStream().collect(Collectors.toMap(user -> Long.valueOf(user.getId()), user -> user));
数据库表字段
alter table inv_question
add create_user bigint null comment '创建人';
alter table inv_question
add create_time datetime null comment '创建时间';
alter table inv_question
add update_user bigint null comment '更新人';
alter table inv_question
add update_time datetime null comment '更新时间';
alter table inv_question
add is_top int null comment '是否置顶,0默认;1置顶;' after status;
alter table inv_question
modify collection_count int null comment '收藏计数' after update_time;
Build对象
类.build.xxxxx.build()
创建空集合
Collections.emptyList()
Collections.emptySet()
Collections.emptyMap()