liujie
2025-04-29 40bfb646d1b962d33841c1ebbceb0dd7cb668bfb
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
<?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.panzhihua.sangeshenbian.dao.SystemLogMapper">
 
    <select id="getLogList" resultType="com.panzhihua.sangeshenbian.model.entity.SystemLog">
        select t1.id, t1.operator_id, t2.name as operatorName, t2.phone as operatorPhone, t1.operator_category, t1.target_name, t1.ip, t1.create_time, t1.operator_into
        from sgsb_system_log t1 left join  sgsb_system_user t2 on t1.operator_id = t2.id
        where 1=1
        <if test="operatorName != null and operatorName != ''">
            and t2.name like concat('%',#{operatorName},'%')
        </if>
        <if test="operatorPhone != null and operatorPhone != ''">
            and t2.phone like concat('%',#{operatorPhone},'%')
        </if>
        <if test="operatorCategory != null and operatorCategory != ''">
            and t1.operator_category = #{operatorCategory}
        </if>
        <if test="ip != null and ip != ''">
            and t1.ip = #{ip}
        </if>
        <if test="sTime != null">
            and t1.create_time between #{sTime} and #{eTime}
        </if>
        order by t1.create_time desc
    </select>
</mapper>