1.update user info avatar to thumbnail

main
Gary 8 months ago
parent 0b8ad47f63
commit ec8a8c4803

@ -187,7 +187,7 @@ public class MyController extends BaseController {
userInfoService.update(user);
rabbitTemplate.convertAndSend("userInfoCommentCache",userLoginDto.getUserId());
return Result.success(Constants.RESOURCE_PREFIX + avatarFilePath);
return Result.success(Constants.RESOURCE_PREFIX + user.getThumbnail());
}
@ApiOperation(value = "4.查看他人信息", notes = "游客无法查看他人信息")
@ -327,7 +327,7 @@ public class MyController extends BaseController {
userRespDTO.setBadgeList(new ArrayList<>(badgeSet));
}
if (null != userRespDTO.getAvatar()) {
userRespDTO.setAvatar(Constants.RESOURCE_PREFIX + userRespDTO.getAvatar());
userRespDTO.setAvatar(getAvatar(user));
}
if (null != user.getBirthday()) {
userRespDTO.setBirthDay(
@ -360,6 +360,13 @@ public class MyController extends BaseController {
return userRespDTO;
}
private String getAvatar(UserInfo user) {
if(StringTools.isEmpty(user.getThumbnail())) {
return Constants.RESOURCE_PREFIX + user.getAvatar();
}
return Constants.RESOURCE_PREFIX + user.getThumbnail();
}
// 查询我的获赞
@ApiOperation(value = "9.查询我的获赞的分页列表", notes = "游客无法获取")
@GetMapping("/myThumbupList/{page}/{size}")

Loading…
Cancel
Save