From 77a79a8a245a8d835881cc69eb5b4c1f45f6093a Mon Sep 17 00:00:00 2001
From: Helius <wangdoubleone@gmail.com>
Date: Thu, 13 May 2021 18:25:02 +0800
Subject: [PATCH] modify

---
 src/main/java/com/xcong/excoin/modules/member/service/impl/MemberServiceImpl.java |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 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 34ce013..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;
@@ -125,6 +128,9 @@
 
     @Resource
     private MemberWalletContractSimulateDao memberWalletContractSimulateDao;
+
+    @Autowired
+    private YdBasicLevelSettingDao ydBasicLevelSettingDao;
 
     @Transactional()
     @Override
@@ -288,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();
@@ -298,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