Commit 710a3c1b authored by Smile's avatar Smile Committed by wux

fix:会员无等级情况页面显示报错

parent 152dec63
......@@ -152,17 +152,30 @@ public class MemberUserController {
QueryWrapper queryWrapper = new QueryWrapper();
queryWrapper.eq("member_id",user.getId());
MemberUserLevelDetailsDO memberUserLevelDetailsDO = memberUserLevelDetailsMapper.selectOne(queryWrapper);
MemberUserLevelConfigDO realLevel = memberUserLevelConfigService.getById(memberUserLevelDetailsDO.getConfigId());
MemberUserScoreLevelVO scoreLevelVO;
if (memberUserLevelDetailsDO != null){
MemberUserLevelConfigDO realLevel = memberUserLevelConfigService.getById(memberUserLevelDetailsDO.getConfigId());
scoreLevelVO = MemberUserScoreLevelVO.builder().memberId(user.getId())
.memberCode(user.getMemberCode())
.holdScore(user.getHoldScore())
.expiredScore(user.getExpiredScore())
.usedScore(user.getUsedScore())
.levelIcon(realLevel.getIcon())
.levelName(realLevel.getName())
.level(realLevel.getLevel())
.build();
}else {
scoreLevelVO = MemberUserScoreLevelVO.builder().memberId(user.getId())
.memberCode(user.getMemberCode())
.holdScore(user.getHoldScore())
.expiredScore(user.getExpiredScore())
.usedScore(user.getUsedScore())
.levelIcon(null)
.levelName(null)
.level(null)
.build();
}
// MemberUserLevelConfigBaseRespVO userScoreLevelVO = memberUserLevelConfigService.getLevelByCount(user.getTotalScore());
MemberUserScoreLevelVO scoreLevelVO = MemberUserScoreLevelVO.builder().memberId(user.getId())
.memberCode(user.getMemberCode())
.holdScore(user.getHoldScore())
.expiredScore(user.getExpiredScore())
.usedScore(user.getUsedScore())
.levelIcon(realLevel.getIcon())
.levelName(realLevel.getName())
.level(realLevel.getLevel())
.build();
userBackVO.setUserScoreLevelInfo(scoreLevelVO);
userBackVO.setPassword(null);
userBackVO.setBackLetterImg(null);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment