From 71756c5945f5174f53302b127e4ea5e437f8d53b Mon Sep 17 00:00:00 2001
From: KKSU <15274802129@163.com>
Date: Sat, 11 May 2024 10:06:40 +0800
Subject: [PATCH] 测试新
---
src/main/resources/mapper/dapp/MallAchieveRecordMapper.xml | 63 +++++++++++++++++++++++++++++++
1 files changed, 63 insertions(+), 0 deletions(-)
diff --git a/src/main/resources/mapper/dapp/MallAchieveRecordMapper.xml b/src/main/resources/mapper/dapp/MallAchieveRecordMapper.xml
index 28702b3..1c41241 100644
--- a/src/main/resources/mapper/dapp/MallAchieveRecordMapper.xml
+++ b/src/main/resources/mapper/dapp/MallAchieveRecordMapper.xml
@@ -40,7 +40,70 @@
<select id="selectListByMemberId" resultType="cc.mrbird.febs.dapp.entity.MallAchieveRecord">
select * from mall_achieve_record
where member_id = #{memberId}
+ and is_normal = 1
order by CREATE_TIME asc
</select>
+ <select id="selectListByMemberIdAndScore" resultType="cc.mrbird.febs.dapp.entity.MallAchieveRecord">
+ select * from mall_achieve_record
+ where member_id = #{memberId}
+ and score > 0
+ order by CREATE_TIME asc
+ </select>
+
+ <select id="selectListCostAmountByMemberId" resultType="cc.mrbird.febs.dapp.entity.MallAchieveRecord">
+ select * from mall_achieve_record
+ where member_id = #{memberId}
+ order by CREATE_TIME asc
+ </select>
+
+ <select id="selectAchieveTotalByMemberIdAndCreateTime" resultType="java.math.BigDecimal">
+ select IFNULL(sum(IFNULL(cost_amount,0)),0) from mall_achieve_record
+ where
+ member_id = #{memberId}
+ and pay_time >= #{date}
+ </select>
+
+
+ <select id="selectAchieveTotalByCreateTime" resultType="java.math.BigDecimal">
+ select IFNULL(sum(IFNULL(amount,0)),0) from mall_achieve_record
+ where pay_time >= #{date}
+ </select>
+
+ <select id="selectAchieveByMemberId" resultType="java.math.BigDecimal">
+ select IFNULL(sum(IFNULL(a.amount, 0)), 0)
+ from mall_achieve_record a
+ inner join dapp_member b on a.member_id = b.ID
+ where is_normal = 1
+ <if test="type == 1">
+ and b.invite_id=#{inviteId}
+ </if>
+ <if test="type == 2">
+ and find_in_set(#{inviteId}, b.referer_ids)
+ </if>
+ </select>
+
+ <select id="selectTeamListByInviteId" resultType="cc.mrbird.febs.dapp.vo.TeamChildListVo">
+ select
+ a.invite_id inviteId,
+ a.address address,
+ a.account_type accountType,
+ a.create_time createTime
+ from dapp_member a
+ where a.referer_id=#{inviteId}
+ </select>
+
+ <select id="selectCountByInvitedId" resultType="cc.mrbird.febs.dapp.entity.MallAchieveRecord">
+ select *
+ from mall_achieve_record a
+ inner join dapp_member b on a.member_id = b.ID
+ where is_normal = 1
+ <if test="type == 1">
+ and b.invite_id=#{inviteId}
+ </if>
+ <if test="type == 2">
+ and (find_in_set(#{inviteId}, b.referer_ids) or b.invite_id=#{inviteId})
+ </if>
+ </select>
+
</mapper>
\ No newline at end of file
--
Gitblit v1.9.1