Files
HAOVP/backend/video-admin/src/main/resources/mapper/AdminOperationLogMapper.xml
T

30 lines
1.1 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.nuaa.video.admin.mapper.AdminOperationLogMapper">
<!-- 分页查询操作日志 -->
<select id="selectLogList" resultType="com.nuaa.video.admin.entity.AdminOperationLog">
SELECT
*
FROM
admin_operation_log
<where>
<if test="username != null and username != ''">
AND username LIKE CONCAT('%', #{username}, '%')
</if>
<if test="operation != null and operation != ''">
AND operation LIKE CONCAT('%', #{operation}, '%')
</if>
<if test="status != null">
AND status = #{status}
</if>
<if test="startTime != null and startTime != ''">
AND operation_time &gt;= #{startTime}
</if>
<if test="endTime != null and endTime != ''">
AND operation_time &lt;= #{endTime}
</if>
</where>
ORDER BY operation_time DESC
</select>
</mapper>