From 5117fe2958a1bcec82e09fce01e49bb0bc2e0ba4 Mon Sep 17 00:00:00 2001 From: 疯狂的狮子Li <15040126243@163.com> Date: 星期三, 14 十二月 2022 15:11:09 +0800 Subject: [PATCH] update 同步 ruoyi 相关提交 * fix 修复 文件名包含特殊字符(+、-、*...)的文件无法下载问题 * update 优化 弹窗内容过多展示不全问题 * update echarts 4.9.0 => 5.4.0 * fix 修复 Vue3树形下拉不能默认选中 * update 优化 删除fuse无效选项maxPatternLength * fix 修复 代码生成图片/文件/单选时选择必填无法校验问题 * fix 修复 修改参数键名时 未移除过期缓存配置 --- ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysOperLogServiceImpl.java | 17 +++++++++-------- 1 files changed, 9 insertions(+), 8 deletions(-) diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysOperLogServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysOperLogServiceImpl.java index d146819..28ac34c 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysOperLogServiceImpl.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysOperLogServiceImpl.java @@ -5,15 +5,15 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.ruoyi.common.core.domain.PageQuery; -import com.ruoyi.common.core.domain.dto.OperLogDTO; +import com.ruoyi.common.core.domain.event.OperLogEvent; import com.ruoyi.common.core.page.TableDataInfo; -import com.ruoyi.common.core.service.OperLogService; import com.ruoyi.common.utils.StringUtils; import com.ruoyi.common.utils.ip.AddressUtils; import com.ruoyi.system.domain.SysOperLog; import com.ruoyi.system.mapper.SysOperLogMapper; import com.ruoyi.system.service.ISysOperLogService; import lombok.RequiredArgsConstructor; +import org.springframework.context.event.EventListener; import org.springframework.scheduling.annotation.Async; import org.springframework.stereotype.Service; @@ -29,19 +29,19 @@ */ @RequiredArgsConstructor @Service -public class SysOperLogServiceImpl implements ISysOperLogService, OperLogService { +public class SysOperLogServiceImpl implements ISysOperLogService { private final SysOperLogMapper baseMapper; /** * 鎿嶄綔鏃ュ織璁板綍 * - * @param operLogDTO 鎿嶄綔鏃ュ織淇℃伅 + * @param operLogEvent 鎿嶄綔鏃ュ織浜嬩欢 */ @Async - @Override - public void recordOper(final OperLogDTO operLogDTO) { - SysOperLog operLog = BeanUtil.toBean(operLogDTO, SysOperLog.class); + @EventListener + public void recordOper(OperLogEvent operLogEvent) { + SysOperLog operLog = BeanUtil.toBean(operLogEvent, SysOperLog.class); // 杩滅▼鏌ヨ鎿嶄綔鍦扮偣 operLog.setOperLocation(AddressUtils.getRealAddressByIP(operLog.getOperIp())); insertOperlog(operLog); @@ -65,7 +65,8 @@ .between(params.get("beginTime") != null && params.get("endTime") != null, SysOperLog::getOperTime, params.get("beginTime"), params.get("endTime")); if (StringUtils.isBlank(pageQuery.getOrderByColumn())) { - pageQuery.setOrderByColumn("oper_id").setIsAsc("desc"); + pageQuery.setOrderByColumn("oper_id"); + pageQuery.setIsAsc("desc"); } Page<SysOperLog> page = baseMapper.selectPage(pageQuery.build(), lqw); return TableDataInfo.build(page); -- Gitblit v1.9.3