From 8dbaa58169feb425785b55427358a1be0b51dfca Mon Sep 17 00:00:00 2001
From: Helius <wangdoubleone@gmail.com>
Date: Thu, 10 Mar 2022 16:19:22 +0800
Subject: [PATCH] fix

---
 src/main/resources/mapper/walletCoinOrder/ZhiYaRecordDao.xml |   31 +++++++++++++++++++++++++++++++
 1 files changed, 31 insertions(+), 0 deletions(-)

diff --git a/src/main/resources/mapper/walletCoinOrder/ZhiYaRecordDao.xml b/src/main/resources/mapper/walletCoinOrder/ZhiYaRecordDao.xml
index 45c778d..7c7fde4 100644
--- a/src/main/resources/mapper/walletCoinOrder/ZhiYaRecordDao.xml
+++ b/src/main/resources/mapper/walletCoinOrder/ZhiYaRecordDao.xml
@@ -55,4 +55,35 @@
 		SELECT ifnull(sum(a.zhiya_cnt),0)  FROM zhiya_record a where a.order_status= #{orderStatus} and #{now} > a.effect_date
 	</select>
 
+	<select id="selectZhiyaTeamRecordByMemberId" resultType="com.xcong.excoin.modules.coin.entity.ZhiYaTeam">
+		SELECT a.*  FROM zhiya_Team a where a.member_id= #{memberId}
+	</select>
+
+
+	<select id="selectZhiyaTeamRecordByMemberIdAndOrderNo" resultType="com.xcong.excoin.modules.coin.entity.ZhiyaRewardEntity">
+		<![CDATA[ SELECT a.*  FROM zhiya_reward a where a.member_id= #{memberId} and a.type = 1 and a.record_no = #{orderNo}
+                                   and DATE_FORMAT(a.create_time, '%Y-%m-%d') = DATE_FORMAT(#{now}, '%Y-%m-%d')]]>
+	</select>
+
+	<select id="selectSumZhiyaCntByMemberIdAndOrderStatus" resultType="long">
+		SELECT ifnull(sum(a.zhiya_cnt),0)  FROM zhiya_record a where a.member_id= #{memberId} and a.order_status = #{orderStatus}
+	</select>
+
+	<select id="selectSumRewardCntByMemberId" resultType="long">
+		SELECT ifnull(sum(a.reward_amout),0)  FROM zhiya_reward a where a.member_id= #{memberId} and type= 1
+	</select>
+
+	<select id="selectZhiyaRewardTypeToByMemberIdInPage" resultType="com.xcong.excoin.modules.coin.parameter.vo.ZhiyaRewardVo">
+		select * from zhiya_reward
+		<if test="record != null">
+			<where>
+			and type = 2
+				<if test="record.memberId != null" >
+					and member_id=#{record.memberId}
+				</if>
+			</where>
+		</if>
+		order by id desc
+	</select>
+
 </mapper>

--
Gitblit v1.9.1