Helius
2021-05-26 0eb68e935e7a09fb2c20abb0276bdf4e4f554c5d
src/main/resources/mapper/documentary/FollowFollowerProfitDao.xml
@@ -2,6 +2,19 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.xcong.excoin.modules.documentary.dao.FollowFollowerProfitDao">
   <select id="selectBondAmountByTradeIdAndMemberId" resultType="java.math.BigDecimal">
      SELECT
         b.bond_amount
      FROM
         follow_follower_order_relation a
            LEFT JOIN contract_order b ON a.order_id = b.id
      WHERE
         a.member_id = #{memberId}
        AND a.trade_id = #{tradeId}
        AND a.order_type = 2
      order by b.create_time desc
   </select>
   <select id="selectSumRewardAmountByMemberId" resultType="java.math.BigDecimal">
      SELECT
         SUM(a.reward_amount)