1
zj
2024-06-13 66c2ab8a29786a5ee15c649890c5ec3c876c4774
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.user.WithdrawMapper">
 
  <select id="listRecord" resultType="com.yami.trading.bean.user.dto.WithdrawDto">
      SELECT
      party.role_name,
      party.user_code,
      party.user_name,
      party.real_name,
      withdraw.remarks remarks,
      withdraw.uuid id,
      withdraw.order_no order_no,
      withdraw.create_time createtime,
      withdraw.failure_msg failure_msg,
      withdraw.amount amount,
      withdraw.`status`,
      withdraw.review_time ,
      withdraw.bank bank,
      withdraw.deposit_bank deposit_bank,
      withdraw.currency currency,
      withdraw.amount_fee amount_fee,
      withdraw.method method,
      withdraw.qdcode qdcode,
      withdraw.address ,
      withdraw.time_settle time_settle,
      withdraw.account account,
      withdraw.volume volume,
      withdraw.tx,
      ur.user_name userNameParent
      FROM
      tz_withdraw_order withdraw
      LEFT JOIN tz_user party ON withdraw.user_id = party.user_id
      LEFT JOIN tz_user ur ON ur.user_id = party.user_recom
      WHERE
      1 =1
        <if test="roleName!=null and roleName!=''">
             and party.role_name=#{roleName}
        </if>
 
      <if test="status!=null and status!=''">
          and withdraw.status=#{status}
      </if>
 
      <if test="orderNo!=null and orderNo!=''">
          and withdraw.order_no=#{orderNo}
      </if>
      <if test="userName!=null and userName!=''">
          and party.user_name=#{userName} or party.user_code=#{userName}
      </if>
      <if test="userIds !=null and userIds.size > 0">
          and party.user_id  in
          <foreach collection="userIds" item="item" index="index" open="(" close=")" separator=",">
              #{item}
          </foreach>
      </if>
 
      order by withdraw.create_time desc
  </select>
</mapper>