智慧保安后台管理-外网
Administrator
2022-06-09 9c08a3cfd782b2818e335da9d678abfb4d584fb9
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<?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="org.springblade.modules.log.mapper.HandlerLogMapper">
 
    <!--根据deptId查询 操作日志-->
    <select id="selectHandlerLogPage" resultType="org.springblade.modules.log.vo.HandlerLogVo">
        select shl.*,bu.real_name realName,bd.dept_name deptName from sys_handler_log shl
        left join blade_user bu on bu.id = shl.user_id
        left join blade_dept bd on shl.dept_id = bd.id
        where 1=1
        <if test="handlerLog.deptName!=null and handlerLog.deptName!''">
            bd.dept_name like concat('%',#{handlerLog.deptName},'%')
        </if>
        <if test="handlerLog.deptId!=null and handlerLog.deptId!''">
            shl.dept_id = #{handlerLog.deptId}
        </if>
        order by shl.id desc
    </select>
 
</mapper>