From 5416c6ab09efbd9fc0b0c2846b05e580f7869d48 Mon Sep 17 00:00:00 2001 From: KKSU <15274802129@163.com> Date: Mon, 26 Feb 2024 10:26:27 +0800 Subject: [PATCH] 抽奖 --- src/main/java/cc/mrbird/febs/mall/service/impl/ApiMallMemberServiceImpl.java | 12 +++++++----- 1 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/main/java/cc/mrbird/febs/mall/service/impl/ApiMallMemberServiceImpl.java b/src/main/java/cc/mrbird/febs/mall/service/impl/ApiMallMemberServiceImpl.java index aa3ce94..b2232bb 100644 --- a/src/main/java/cc/mrbird/febs/mall/service/impl/ApiMallMemberServiceImpl.java +++ b/src/main/java/cc/mrbird/febs/mall/service/impl/ApiMallMemberServiceImpl.java @@ -273,15 +273,17 @@ } if(AgentLevelEnum.LEVEL_ONE.name().equals(mallAgentRecordAgree.getAgentLevel())){ mallMemberVo.setAgentLevel(1); - }else if(AgentLevelEnum.LEVEL_TWO.name().equals(mallAgentRecordAgree.getAgentLevel())){ + } + if(AgentLevelEnum.LEVEL_TWO.name().equals(mallAgentRecordAgree.getAgentLevel())){ mallMemberVo.setAgentLevel(2); - }else if(AgentLevelEnum.LEVEL_THREE.name().equals(mallAgentRecordAgree.getAgentLevel())){ + } + if(AgentLevelEnum.LEVEL_THREE.name().equals(mallAgentRecordAgree.getAgentLevel())){ mallMemberVo.setAgentLevel(3); } }else if(ObjectUtil.isNotEmpty(mallAgentRecordDisagree)){ mallMemberVo.setIsAgent(3); } - log.info(mallMemberVo.getName()+"---"+mallMemberVo.getAgentLevel()); +// log.info(mallMemberVo.getName()+"---"+mallMemberVo.getAgentLevel()); return new FebsResponse().success().data(mallMemberVo); } @@ -798,9 +800,9 @@ @Override public void updateMemberAgent(Long memberId,String levelCode) { mallAgentRecordMapper.updateStateByMemberId(memberId); - + MallAgentRecord mallAgentRecord = mallAgentRecordMapper.selectById(memberId); //更新用户表中的LEVEL - MallMember mallMember = this.baseMapper.selectById(memberId); + MallMember mallMember = this.baseMapper.selectById(mallAgentRecord.getMemberId()); mallMember.setLevel(levelCode); this.baseMapper.updateById(mallMember); } -- Gitblit v1.9.1