From 230719d14abc27910157b0c69e3b3278f492f100 Mon Sep 17 00:00:00 2001
From: Helius <wangdoubleone@gmail.com>
Date: Wed, 29 Nov 2023 00:12:42 +0800
Subject: [PATCH] fix
---
src/main/resources/mapper/modules/MallMemberMapper.xml | 2 +-
src/main/java/cc/mrbird/febs/mall/service/impl/ApiMallMemberServiceImpl.java | 4 ++--
2 files changed, 3 insertions(+), 3 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 fd30d7e..2e67af9 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
@@ -947,8 +947,8 @@
throw new FebsException("已绑定");
}
String inviteId = apiSetInviteDto.getInviteId();
- if(inviteId.equals(mallMember.getReferrerId())){
- throw new FebsException("自己无法绑定自己");
+ if(inviteId.equals(mallMember.getInviteId())){
+ return new FebsResponse().success();
}
MallMember member = this.baseMapper.selectInfoByInviteId(inviteId);
if (member != null) {
diff --git a/src/main/resources/mapper/modules/MallMemberMapper.xml b/src/main/resources/mapper/modules/MallMemberMapper.xml
index e653c6b..f06a925 100644
--- a/src/main/resources/mapper/modules/MallMemberMapper.xml
+++ b/src/main/resources/mapper/modules/MallMemberMapper.xml
@@ -92,7 +92,7 @@
where e.status in (2, 3, 4) and e.order_type=1 and (b.invite_id=a.invite_id or b.referrer_id=a.invite_id)) amount,
(select count(1) from mall_member e
inner join mall_order_info b on e.id=b.member_id and b.status in (2, 3, 4)
- where find_in_set(a.invite_id, e.referrer_ids)) orderCnt,
+ where find_in_set(a.invite_id, e.referrer_ids) or a.invite_id=e.invite_id) orderCnt,
(select count(1) from mall_member x where find_in_set(a.invite_id, x.referrer_ids)) cnt
from mall_member a
where a.referrer_id=#{inviteId}
--
Gitblit v1.9.1