From ff9710a8a5537c71f7dcaa2c7a64866c8e9e1355 Mon Sep 17 00:00:00 2001 From: xiaoyong931011 <15274802129@163.com> Date: Sun, 25 Apr 2021 10:15:11 +0800 Subject: [PATCH] 20210425 交易员列表查询累计跟随本金 --- src/main/resources/mapper/documentary/FollowFollowerProfitDao.xml | 13 +++++++++++++ 1 files changed, 13 insertions(+), 0 deletions(-) diff --git a/src/main/resources/mapper/documentary/FollowFollowerProfitDao.xml b/src/main/resources/mapper/documentary/FollowFollowerProfitDao.xml index 3a2147d..95a1dfc 100644 --- a/src/main/resources/mapper/documentary/FollowFollowerProfitDao.xml +++ b/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) -- Gitblit v1.9.1