xiaoyong931011
2021-07-05 cf200a1f92c01ba22c326c49391f748ffb006910
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
<?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.otc.mapper.OtcEntrustOrderMapper">
 
    <select id="otcEntrustList" resultType="com.xcong.excoin.modules.otc.entity.OtcEntrustOrderEntity">
        SELECT
        *,
        concat(b.first_name,b.second_name) realName
        FROM
        otc_entrust_order a
        LEFT JOIN member m ON m.id = a.member_id
        LEFT JOIN member_authentication b ON b.member_id = a.member_id
        <where>
            <if test="record != null" >
                <if test="record.account!=null and record.account!=''">
                    and (m.phone = #{record.account} or m.email = #{record.account} or m.invite_id=#{record.account})
                </if>
                <if test="record.orderType!=null and record.orderType!=''">
                    and a.order_type= #{record.orderType}
                </if>
                <if test="record.status!=null and record.status!=''">
                    and a.status= #{record.status}
                </if>
            </if>
        </where>
        order by m.create_time desc
    </select>
 
</mapper>