From adb628d7646724beed23e53771bbf18a1b294cf0 Mon Sep 17 00:00:00 2001
From: zainali5120 <512061637@qq.com>
Date: Sat, 20 Feb 2021 15:01:23 +0800
Subject: [PATCH] TRC20版本提交

---
 src/main/resources/mapper/documentary/FollowFollowerProfitDao.xml |   14 +++++++++++++-
 1 files changed, 13 insertions(+), 1 deletions(-)

diff --git a/src/main/resources/mapper/documentary/FollowFollowerProfitDao.xml b/src/main/resources/mapper/documentary/FollowFollowerProfitDao.xml
index 61f15b5..9978af7 100644
--- a/src/main/resources/mapper/documentary/FollowFollowerProfitDao.xml
+++ b/src/main/resources/mapper/documentary/FollowFollowerProfitDao.xml
@@ -86,7 +86,19 @@
 
 	<update id="updateFollowerProfitByTradeMemberId">
 		update follow_follower_profit
-		set total_principal=#{principal}, total_profit=#{profit}
+		set total_principal=total_principal+#{principal},
+		total_profit=total_profit+#{profit}
 		where trade_member_id=#{tradeMemberId} and member_id=#{memberId}
 	</update>
+
+	<select id="selectFollowerCntByTradeMemberId" resultType="java.lang.Integer">
+		select count(1) from follow_follower_profit
+		where trade_member_id=#{tradeMemberId}
+	</select>
+
+	<select id="selectAllFollowerProfit" resultType="java.math.BigDecimal">
+		select sum(total_profit)
+		from follow_follower_profit
+		where trade_member_id=#{tradeMemberId}
+	</select>
 </mapper>
\ No newline at end of file

--
Gitblit v1.9.1