42 lines
1.3 KiB
XML
42 lines
1.3 KiB
XML
<?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.youlai.system.mapper.SysLogMapper">
|
|
|
|
<!-- 日志分页列表 -->
|
|
<select id="listPagedLogs" resultType="com.youlai.system.model.vo.LogPageVO">
|
|
SELECT
|
|
id,
|
|
module,
|
|
content,
|
|
request_uri,
|
|
method,
|
|
ip,
|
|
concat(province, city) AS region,
|
|
execution_time,
|
|
browser,
|
|
browser_version,
|
|
os,
|
|
create_time,
|
|
t2.nickname AS operator
|
|
FROM
|
|
sys_log t1
|
|
LEFT JOIN sys_user t2 ON t1.create_by = t2.id
|
|
<where>
|
|
t1.is_deleted = 0
|
|
<if test="queryParams.keywords != null and queryParams.keywords != ''">
|
|
AND (
|
|
t1.content LIKE concat('%',#{queryParams.keywords},'%')
|
|
OR
|
|
t1.ip LIKE concat('%',#{queryParams.keywords},'%')
|
|
OR
|
|
t2.nickname LIKE concat('%',#{queryParams.keywords},'%')
|
|
)
|
|
</if>
|
|
</where>
|
|
ORDER BY
|
|
t1.create_time DESC
|
|
</select>
|
|
</mapper>
|