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
<?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.UserSafewordApplyMapper">
 
  <select id="listRecord" resultType="com.yami.trading.bean.user.dto.UserSafewordApplyDto">
      SELECT hl.*,u.user_name,u.user_code,u.role_name,u.user_level,u.real_name,u.real_name_authority FROM t_user_safeword_apply   hl
      LEFT JOIN  tz_user  u ON  hl.user_id=u.user_id
           where 1=1
        <if test="roleName!=null and roleName!=''">
             and u.role_name=#{roleName}
        </if>
 
      <if test="status!=null and status!=''">
          and hl.status=#{status}
      </if>
 
 
      <if test="operate!=null and operate!=''">
          and hl.operate=#{operate}
      </if>
      <if test="userCode!=null and userCode!=''">
          and (u.user_code=#{userCode} or u.user_name=#{userCode})
      </if>
      <if test="userName!=null and userName!=''">
          and (u.user_code=#{userName} or u.user_name=#{userName})
      </if>
 
      <if test=" userIds !=null and userIds.size > 0">
          and u.user_id  in
          <foreach collection="userIds" item="item" index="index" open="(" close=")" separator=",">
              #{item}
          </foreach>
      </if>
      order by hl.create_time desc
  </select>
</mapper>