From 2e17d2cd714c047196915b37935e82b9d3d0bc80 Mon Sep 17 00:00:00 2001
From: Helius <wangdoubleone@gmail.com>
Date: Tue, 13 Oct 2020 21:28:39 +0800
Subject: [PATCH] modify

---
 src/main/java/com/xcong/excoin/modules/member/service/impl/MemberServiceImpl.java |    8 ++++++++
 1 files changed, 8 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 6b89fbe..1834652 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())) {

--
Gitblit v1.9.1