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
<?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.log.AutoMonitorDAppLogMapper">
 
  <select id="listPage" resultType="com.yami.trading.bean.log.dto.AutoMonitorDAppLogDto">
      SELECT
      u.user_name ,
      u.role_name,
      u.user_code,
      ur.user_name userNameParent,
      dapp.*
      FROM
      t_auto_monitor_dapp_log dapp
      LEFT JOIN tz_user  u ON dapp.user_id = u.user_id
      LEFT JOIN tz_user ur ON u.user_recom = ur.user_id
 
                                where  1=1
        <if test="rolename!=null and rolename!=''">
             and u.role_name=#{rolename}
        </if>
 
      <if test="action!=null and action!=''">
          and dapp.action=#{action}
      </if>
 
      <if test="userName!=null and userName!=''">
          and u.user_name=#{userName} or u.user_code=#{userName}
      </if>
 
      <if test="startTime!=null and endTime!=null">
          and dapp.create_time BETWEEN #{startTime} and #{endTime}
      </if>
      order by dapp.create_time desc
  </select>
</mapper>