zainali5120
2021-02-20 4ae1cb0def3b87c6632af4a9bd391d3f34d504a6
src/main/resources/mapper/documentary/FollowFollowerProfitDao.xml
@@ -84,4 +84,21 @@
         and trade_id = #{traderId} 
    </select>
   <update id="updateFollowerProfitByTradeMemberId">
      update follow_follower_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>