Helius
2021-05-21 d30d959c8f249c20b39e66dd0c48341a77751d21
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)