1
zj
2024-06-13 8eea5be3b36875bd4ffe70e6c3a5bb07b1d829bf
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
<?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.yami.trading.dao.item.ItemMapper">
 
    <sql id="itemColumns">
        a.uuid AS "uuid",
        a.name AS "name",
        a.en_name AS "enName",
        a.symbol AS "symbol",
        a.symbol_data AS "symbolData",
        a.pips AS "pips",
        a.type AS "type",
        a.pips_amount AS "pipsAmount",
        a.adjustment_value AS "adjustmentValue",
        a.unit_amount AS "unitAmount",
        a.unit_fee AS "unitFee",
        a.unit_percentage AS "unitPercentage",
        a.market AS "market",
        a.decimals AS "decimals",
        a.multiple AS "multiple",
        a.borrowing_rate AS "borrowingRate",
        a.symbol_full_name AS "symbolFullName",
        a.create_by AS "createBy",
        a.create_time AS "createTime",
        a.update_by AS "updateBy",
        a.update_time AS "updateTime",
        a.remarks AS "remarks",
        a.del_flag AS "delFlag",
        a.category AS "category",
        a.sorted AS "sorted",
        a.quote_currency AS "quoteCurrency",
        a.show_status AS "showStatus",
        a.trade_status AS "tradeStatus"
    </sql>
 
    <sql id="itemJoins">
 
    </sql>
 
 
 
    <select id="findById" resultType="com.yami.trading.bean.item.dto.ItemDTO">
        SELECT
            <include refid="itemColumns"/>
        FROM t_item a
        <include refid="itemJoins"/>
        WHERE a.uuid = #{id} and a.del_flag = 0
    </select>
 
    <select id="findList" resultType="com.yami.trading.bean.item.dto.ItemDTO">
        SELECT
            <include refid="itemColumns"/>
        FROM t_item a
        <include refid="itemJoins"/>
        ${ew.customSqlSegment}
        order by sorted desc
    </select>
 
 
</mapper>