feat: There is no way the, 操作日志导出1年内

This commit is contained in:
super_liu
2022-06-16 17:31:08 +08:00
parent a2546f2815
commit 11de5d4c55
10 changed files with 164 additions and 8 deletions
@@ -2,6 +2,29 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.adc.da.slrs.sysLog.dao.SysLogDao">
<select id="getSysLogExcelVOExcelData" parameterType="com.adc.da.slrs.sysLog.vo.SysLogReqExportDTO" resultType="com.adc.da.slrs.sysLog.entity.SysLogExcel">
select CONCAT('(',ts_user.account,')',ts_user.UNAME) as account,ts_user.UNAME as accountName,ts_institution.name dept,sys_log.oper_time,sys_log.oper,sys_log.special from sys_log
left join ts_user on sys_log.user_id = ts_user.usid
left join ts_institution on ts_user.institution_id = ts_institution.id
WHERE 1=1 and sys_log.oper_time >= DATE_SUB(CURDATE(),INTERVAL 1 YEAR)
<if test="sysLogReqDTO.account != null and sysLogReqDTO.account != ''">
and ts_user.account = #{sysLogReqDTO.account}
</if>
<if test="sysLogReqDTO.sTime != null and sysLogReqDTO.sTime != ''">
and sys_log.oper_time >= #{sysLogReqDTO.sTime}
</if>
<if test="sysLogReqDTO.eTime != null and sysLogReqDTO.eTime != ''">
and sys_log.oper_time &lt;= #{sysLogReqDTO.eTime}
</if>
<if test="sysLogReqDTO.oper != null and sysLogReqDTO.oper != ''">
and sys_log.oper = #{sysLogReqDTO.oper}
</if>
<if test="sysLogReqDTO.content != null and sysLogReqDTO.content != ''">
and sys_log.special like concat(concat('%',#{sysLogReqDTO.content}),'%')
</if>
order by sys_log.oper_time desc
</select>
<select id="queryAllLog" parameterType="com.adc.da.slrs.sysLog.vo.SysLogReqDTO" resultType="com.adc.da.slrs.sysLog.entity.SysLog">
select ts_user.account,ts_user.UNAME as accountName,ts_institution.name dept,sys_log.oper_time,sys_log.oper,sys_log.special from sys_log
left join ts_user on sys_log.user_id = ts_user.usid