审计日志文件备份、文件恢复
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
package com.njcn.system.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.njcn.system.pojo.dto.excel.UserLogExcel;
|
||||
import com.njcn.system.pojo.param.AuditParam;
|
||||
import com.njcn.system.pojo.po.UserLog;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
@@ -18,5 +20,9 @@ public interface AuditMapper {
|
||||
List<UserLog> selectAuditLog(@Param("auditParam") AuditParam auditParam);
|
||||
|
||||
int getCount(@Param("auditParam") AuditParam auditParam);
|
||||
/**
|
||||
* 查询需要备份的审计日志
|
||||
*/
|
||||
List<UserLogExcel> queryExportUser(@Param("ew") QueryWrapper<UserLogExcel> queryWrapper);
|
||||
|
||||
}
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
SELECT
|
||||
id,
|
||||
user_name userName,
|
||||
login_name loginName,
|
||||
ip,
|
||||
operate,
|
||||
operate_type operateType,
|
||||
@@ -43,4 +44,27 @@
|
||||
AND id >= (select id from sys_user_log order by id limit #{auditParam.pageNum}, 1) limit #{auditParam.pageSize}
|
||||
</select>
|
||||
|
||||
<select id="queryExportUser" resultType="UserLogExcel">
|
||||
SELECT
|
||||
id,
|
||||
login_name loginName,
|
||||
user_name userName,
|
||||
ip,
|
||||
operate,
|
||||
operate_type operateType,
|
||||
result,
|
||||
fail_reason failReason,
|
||||
level,
|
||||
type,
|
||||
service_name serviceName,
|
||||
state,
|
||||
create_by createBy,
|
||||
create_time createTime,
|
||||
update_by updateBy,
|
||||
update_time updateTime
|
||||
FROM sys_user_log
|
||||
Where ${ew.sqlSegment}
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user