|
|
|
@ -36,6 +36,7 @@ import constants.Constants;
|
|
|
|
|
import controller.BaseController;
|
|
|
|
|
|
|
|
|
|
import com.luoo.user.dto.UserInfoUpdateDto;
|
|
|
|
|
import com.luoo.user.dto.response.UserBadge;
|
|
|
|
|
import com.luoo.user.dto.response.UserRespDTO;
|
|
|
|
|
import com.luoo.user.util.IpUtil;
|
|
|
|
|
|
|
|
|
@ -48,6 +49,7 @@ import dto.UserLoginDto;
|
|
|
|
|
import enums.CollectTypeEnum;
|
|
|
|
|
import enums.DateTimePatternEnum;
|
|
|
|
|
import enums.RequestFrequencyTypeEnum;
|
|
|
|
|
import enums.UserBadgeEnum;
|
|
|
|
|
import enums.UserRelationEnum;
|
|
|
|
|
import io.swagger.annotations.Api;
|
|
|
|
|
import io.swagger.annotations.ApiImplicitParam;
|
|
|
|
@ -275,7 +277,7 @@ public class MyController extends BaseController {
|
|
|
|
|
UserRespDTO userRespDTO = new UserRespDTO();
|
|
|
|
|
BeanUtils.copyProperties(user, userRespDTO);
|
|
|
|
|
if(!StringTools.isEmpty(user.getBadges())) {
|
|
|
|
|
userRespDTO.setBadgeList(Arrays.stream(user.getBadges().split(",")).map(Integer::valueOf).collect(Collectors.toList()));
|
|
|
|
|
userRespDTO.setBadgeList(Arrays.stream(user.getBadges().split(",")).map(this::getUserBadge).collect(Collectors.toList()));
|
|
|
|
|
}
|
|
|
|
|
if (null != userRespDTO.getAvatar()) {
|
|
|
|
|
userRespDTO.setAvatar(Constants.RESOURCE_PREFIX + userRespDTO.getAvatar());
|
|
|
|
@ -311,7 +313,13 @@ public class MyController extends BaseController {
|
|
|
|
|
return userRespDTO;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private UserBadge getUserBadge(String code) {
|
|
|
|
|
UserBadge userBadge=new UserBadge();
|
|
|
|
|
userBadge.setCode(Integer.valueOf(code));
|
|
|
|
|
userBadge.setDesc(UserBadgeEnum.getByCode(userBadge.getCode()).getDesc());
|
|
|
|
|
return userBadge;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 查询我的获赞
|
|
|
|
|
@ApiOperation(value = "9.查询我的获赞的分页列表", notes = "游客无法获取")
|
|
|
|
|
@GetMapping("/myThumbupList/{page}/{size}")
|
|
|
|
|