From 6aab3e401fc146885d5fb5cb5048cd09de4a6f18 Mon Sep 17 00:00:00 2001 From: xiaoyong931011 <15274802129@163.com> Date: Fri, 14 May 2021 11:32:55 +0800 Subject: [PATCH] 20210514 云顶 --- src/main/java/com/xcong/excoin/modules/member/service/impl/MemberServiceImpl.java | 13 ++++++++++++- 1 files changed, 12 insertions(+), 1 deletions(-) diff --git a/src/main/java/com/xcong/excoin/modules/member/service/impl/MemberServiceImpl.java b/src/main/java/com/xcong/excoin/modules/member/service/impl/MemberServiceImpl.java index 8487e17..68f0586 100644 --- a/src/main/java/com/xcong/excoin/modules/member/service/impl/MemberServiceImpl.java +++ b/src/main/java/com/xcong/excoin/modules/member/service/impl/MemberServiceImpl.java @@ -34,6 +34,8 @@ import com.xcong.excoin.modules.platform.dao.PlatformSymbolsCoinDao; import com.xcong.excoin.modules.platform.entity.PlatformFeeSettingEntity; import com.xcong.excoin.modules.platform.entity.PlatformSymbolsCoinEntity; +import com.xcong.excoin.modules.yunding.dao.YdBasicLevelSettingDao; +import com.xcong.excoin.modules.yunding.entity.YdBasicLevelSettingEntity; import com.xcong.excoin.utils.MessageSourceUtils; import com.xcong.excoin.utils.RedisUtils; import com.xcong.excoin.utils.ShareCodeUtil; @@ -41,6 +43,7 @@ import lombok.extern.slf4j.Slf4j; import org.apache.commons.collections4.Put; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.security.core.context.SecurityContextHolder; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -126,6 +129,9 @@ @Resource private MemberWalletContractSimulateDao memberWalletContractSimulateDao; + @Autowired + private YdBasicLevelSettingDao ydBasicLevelSettingDao; + @Transactional() @Override public Result register(RegisterDto registerDto) { @@ -166,7 +172,6 @@ member.setRefererId(registerDto.getRefererId()); member.setAccountStatus(MemberEntity.ACCOUNT_STATUS_ENABLE); member.setAccountType(MemberEntity.ACCOUNT_TYPE_NORMAL); - member.setAgentLevel(MemberEntity.ACCOUNT_AGENT_LEVEL); member.setCertifyStatus(MemberEntity.CERTIFY_STATUS_UN_SUBMIT); member.setIsForce(1); member.setIsProfit(0); @@ -289,6 +294,7 @@ //获取用户ID Long memberId = LoginUserUtils.getAppLoginUser().getId(); MemberEntity memberEntity = memberDao.selectById(memberId); + MemberInfoVo memberInfoVo = new MemberInfoVo(); if (ObjectUtil.isNotEmpty(memberEntity)) { String email = memberEntity.getEmail(); @@ -299,6 +305,11 @@ memberInfoVo.setPhone(email); } + if (memberEntity.getAgentLevel() != null) { + YdBasicLevelSettingEntity agent = ydBasicLevelSettingDao.selectById(memberEntity.getAgentLevel().longValue()); + memberInfoVo.setAgentName(agent.getName()); + memberInfoVo.setAgentId(agent.getId()); + } memberInfoVo.setInviteId(memberEntity.getInviteId()); } return Result.ok(memberInfoVo); -- Gitblit v1.9.1