新增审计日志列表

This commit is contained in:
陈超
2022-07-13 21:31:30 +08:00
parent 014c766806
commit 53580a46b8
5 changed files with 64 additions and 75 deletions

View File

@@ -3,6 +3,13 @@
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.njcn.system.mapper.AuditMapper">
<select id="getCount" resultType="int">
SELECT count(id)
FROM sys_user_log
WHERE update_time >= #{auditParam.searchBeginTime}
AND #{auditParam.searchEndTime} >= update_time
</select>
<select id="selectAuditLog" resultType="UserLog">
SELECT
id,
@@ -18,28 +25,22 @@
create_by createBy,
create_time createTime,
update_by updateBy,
update_time updateTime
update_time updateTime,
fail_reason failReason
FROM
sys_user_log
WHERE update_time >= #{auditParam.searchBeginTime}
AND #{auditParam.searchEndTime} >= update_time
<!-- <if test="auditParam.userName!=null">-->
<!-- and update_by = #{auditParam.userName}-->
<!-- </if>-->
<!-- <if test="auditParam.type!=null">-->
<!-- and type = #{auditParam.type}-->
<!-- </if>-->
<!-- <if test="auditParam.operate!=null">-->
<!-- and operate_type = #{auditParam.operate}-->
<!-- </if>-->
<if test="auditParam.userName!=null">
and user_name = #{auditParam.userName}
</if>
<if test="auditParam.type!=null">
and type = #{auditParam.type}
</if>
<if test="auditParam.operate!=null">
and operate = #{auditParam.operate}
</if>
AND id >= (select id from sys_user_log order by id limit #{auditParam.pageNum}, 1) limit #{auditParam.pageSize}
</select>
<select id="getCount" resultType="int">
SELECT count(id)
FROM sys_user_log
WHERE update_time >= #{auditParam.searchBeginTime}
AND #{auditParam.searchEndTime} >= update_time
</select>
</mapper>