Commit 57889e06 authored by Smile's avatar Smile

fix:管理端会员等级显示错误,应该按照会员本身的等级详情显示

parent 7940f8cf
......@@ -22,10 +22,13 @@ import cn.iocoder.yudao.module.member.convert.user.UserConvert;
import cn.iocoder.yudao.module.member.convert.userCardAuth.UserCardAuthConvert;
import cn.iocoder.yudao.module.member.convert.userEnterpriseAuth.UserEnterpriseAuthConvert;
import cn.iocoder.yudao.module.member.convert.userOperationLog.UserOperationLogConvert;
import cn.iocoder.yudao.module.member.dal.dataobject.level.MemberUserLevelConfigDO;
import cn.iocoder.yudao.module.member.dal.dataobject.memberUserLevelDetail.MemberUserLevelDetailsDO;
import cn.iocoder.yudao.module.member.dal.dataobject.user.MemberUserDO;
import cn.iocoder.yudao.module.member.dal.dataobject.userCardAuth.UserCardAuthDO;
import cn.iocoder.yudao.module.member.dal.dataobject.userEnterpriseAuth.UserEnterpriseAuthDO;
import cn.iocoder.yudao.module.member.dal.dataobject.userOperationLog.UserOperationLogDO;
import cn.iocoder.yudao.module.member.dal.mysql.userLevelDetails.MemberUserLevelDetailsMapper;
import cn.iocoder.yudao.module.member.enums.ErrorCodeConstants;
import cn.iocoder.yudao.module.member.enums.UserAuditStatusEnum;
import cn.iocoder.yudao.module.member.service.level.MemberUserLevelConfigService;
......@@ -41,6 +44,7 @@ import cn.iocoder.yudao.module.member.vo.userLevel.MemberUserLevelConfigBaseResp
import cn.iocoder.yudao.module.member.vo.userLevel.MemberUserScoreLevelVO;
import cn.iocoder.yudao.module.member.vo.userOperationLog.UserOperationLogBackVO;
import com.alibaba.excel.util.CollectionUtils;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
......@@ -101,6 +105,8 @@ public class MemberUserController {
@Resource
private MemberUserLevelConfigService memberUserLevelConfigService;
@Resource
private MemberUserLevelDetailsMapper memberUserLevelDetailsMapper;
@GetMapping("/member-user-list")
......@@ -143,15 +149,19 @@ public class MemberUserController {
if (passwordEncoder.matches("88888888", user.getPassword())) {
userBackVO.setIsSimplePassword(Boolean.TRUE);
}
MemberUserLevelConfigBaseRespVO userScoreLevelVO = memberUserLevelConfigService.getLevelByCount(user.getTotalScore());
QueryWrapper queryWrapper = new QueryWrapper();
queryWrapper.eq("member_id",user.getId());
MemberUserLevelDetailsDO memberUserLevelDetailsDO = memberUserLevelDetailsMapper.selectOne(queryWrapper);
MemberUserLevelConfigDO realLevel = memberUserLevelConfigService.getById(memberUserLevelDetailsDO.getConfigId());
// 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(userScoreLevelVO.getIcon())
.levelName(userScoreLevelVO.getName())
.level(userScoreLevelVO.getLevel())
.levelIcon(realLevel.getIcon())
.levelName(realLevel.getName())
.level(realLevel.getLevel())
.build();
userBackVO.setUserScoreLevelInfo(scoreLevelVO);
userBackVO.setPassword(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