xiaoyong931011
2020-07-30 e8eccc34b4b1df20e2e81e304073421523894c31
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<?xml version="1.0" encoding="UTF-8"?>
<!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.FollowTraderProfitInfoDao">
    
    <select id="selectFollowTraderProfitInfoEntity" resultType="com.xcong.excoin.modules.documentary.vo.FollowTraderProfitInfoVo">
        select * from follow_trader_profit_info 
        order by id desc
    </select>
    
    <select id="selectHistoryOrderRecords" resultType="com.xcong.excoin.modules.documentary.vo.HistoryOrderRecordsVo">
        SELECT
            symbol,
            order_type orderType,
            lever_ratio leverRatio,
            opening_price openingPrice,
            closing_price closingPrice,
            reward_ratio rewardRatio,
            opening_time openingTime,
            closing_time closingTime,
            order_no orderNo
        FROM
            contract_order 
        WHERE 
            member_id = #{memberId} 
            and contract_type = 2
            and order_type in (3,4)
            and closing_type not in (4,5)
        order by opening_time desc
    </select>
    
</mapper>