From cbf7a2cc9807f1647a92d9ffc3f51791f8ac9ca0 Mon Sep 17 00:00:00 2001
From: wzy <wzy19931122ai@163.com>
Date: Sun, 01 Nov 2020 16:00:53 +0800
Subject: [PATCH] modify

---
 src/main/java/com/xcong/excoin/modules/member/service/impl/MemberServiceImpl.java |   29 +++++++++++++++++------------
 1 files changed, 17 insertions(+), 12 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 3d28419..7e350ff 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
@@ -177,6 +177,9 @@
                 break;
             }
             parentId = parentMember.getRefererId();
+            if(StringUtils.isBlank(parentId)){
+                break;
+            }
             if (parentMember.getRefererId().equals(parentMember.getInviteId())) {
                 flag = true;
             }
@@ -380,6 +383,11 @@
             if (count > 0) {
                 return Result.fail(MessageSourceUtils.getString("member_service_0060"));
             }
+            // 同一个人只能认证一次
+            int authenByMemberId = memberAuthenticationDao.findAuthenByMemberId(memberId);
+            if (authenByMemberId > 0) {
+                return Result.fail(MessageSourceUtils.getString("member_service_0055"));
+            }
             if (StrUtil.isBlank(memberAuthenticationDto.getIdCardFront())
                     || StrUtil.isBlank(memberAuthenticationDto.getIdCardReverse())
                     || StrUtil.isBlank(memberAuthenticationDto.getIdCardImage())) {
@@ -461,7 +469,8 @@
     @Transactional
     public Result memberTradersPwd(@Valid MemberForgetPwdDto memberForgetPwdDto) {
         //获取用户ID
-        MemberEntity memberEntity = LoginUserUtils.getAppLoginUser();
+        Long memberId = LoginUserUtils.getAppLoginUser().getId();
+        MemberEntity memberEntity = memberDao.selectById(memberId);
 
         String code = memberForgetPwdDto.getCode();
         String password = memberForgetPwdDto.getPassword();
@@ -875,6 +884,10 @@
         //获取用户ID
         Long memberId = LoginUserUtils.getAppLoginUser().getId();
         MemberEntity member = memberDao.selectById(memberId);
+        // 判断是否限制
+        if(1 == member.getIsTrader()){
+            return Result.fail("此账号有财务问题,需联系客服");
+        }
         if (member.getCertifyStatus() != MemberEntity.CERTIFY_STATUS_Y) {
             return Result.fail(MessageSourceUtils.getString("member_service_0077"));
         }
@@ -961,23 +974,15 @@
 
     @Override
     public Result getAppVersionInfo() {
-        MemberEntity memberEntity = LoginUserUtils.getAppLoginUser();
-
         Map<String, Object> columnMap = new HashMap<>();
         List<AppVersionEntity> selectByMap = appVersionDao.selectByMap(columnMap);
         List<Object> arrayList = new ArrayList<>();
         if (CollUtil.isNotEmpty(selectByMap)) {
             for (AppVersionEntity appVersionEntity : selectByMap) {
                 AppVersionVo appVersionVo = new AppVersionVo();
-                if ("37059551".equals(memberEntity.getInviteId())) {
-                    appVersionVo.setAddress("www.baidu.com");
-                    appVersionVo.setType(appVersionEntity.getType());
-                    appVersionVo.setVersion(appVersionEntity.getVersion());
-                } else {
-                    appVersionVo.setAddress(appVersionEntity.getAddress());
-                    appVersionVo.setType(appVersionEntity.getType());
-                    appVersionVo.setVersion(appVersionEntity.getVersion());
-                }
+                appVersionVo.setAddress(appVersionEntity.getAddress());
+                appVersionVo.setType(appVersionEntity.getType());
+                appVersionVo.setVersion(appVersionEntity.getVersion());
                 arrayList.add(appVersionVo);
             }
         }

--
Gitblit v1.9.1