From 06e6f7af0c1df647f5106df4bdf51858b4e86bdc Mon Sep 17 00:00:00 2001 From: zendwang Date: Tue, 29 Nov 2022 18:48:25 +0800 Subject: [PATCH 01/41] =?UTF-8?q?update=20=E7=9F=AD=E4=BF=A1=E6=A0=A1?= =?UTF-8?q?=E9=AA=8C=E6=A8=A1=E6=9D=BF=E5=8F=82=E6=95=B0=E4=BC=A0=E5=8F=82?= =?UTF-8?q?=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-admin/src/main/resources/i18n/messages.properties | 2 +- ruoyi-admin/src/main/resources/i18n/messages_en_US.properties | 2 +- ruoyi-admin/src/main/resources/i18n/messages_zh_CN.properties | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ruoyi-admin/src/main/resources/i18n/messages.properties b/ruoyi-admin/src/main/resources/i18n/messages.properties index e1423a8fd..4ff55f41a 100644 --- a/ruoyi-admin/src/main/resources/i18n/messages.properties +++ b/ruoyi-admin/src/main/resources/i18n/messages.properties @@ -41,5 +41,5 @@ repeat.submit.message=不允许重复提交,请稍候再试 rate.limiter.message=访问过于频繁,请稍候再试 sms.code.not.blank=短信验证码不能为空 sms.code.retry.limit.count=短信验证码输入错误{0}次 -sms.code.retry.limit.exceed=短信验证码输入错误{0}次,帐户锁定{0}分钟 +sms.code.retry.limit.exceed=短信验证码输入错误{0}次,帐户锁定{1}分钟 xcx.code.not.blank=小程序code不能为空 diff --git a/ruoyi-admin/src/main/resources/i18n/messages_en_US.properties b/ruoyi-admin/src/main/resources/i18n/messages_en_US.properties index 04a4aa372..c0faca93a 100644 --- a/ruoyi-admin/src/main/resources/i18n/messages_en_US.properties +++ b/ruoyi-admin/src/main/resources/i18n/messages_en_US.properties @@ -41,5 +41,5 @@ repeat.submit.message=Repeat submit is not allowed, please try again later rate.limiter.message=Visit too frequently, please try again later sms.code.not.blank=Sms code cannot be blank sms.code.retry.limit.count=Sms code input error {0} times -sms.code.retry.limit.exceed=Sms code input error {0} times, account locked for {0} minutes +sms.code.retry.limit.exceed=Sms code input error {0} times, account locked for {1} minutes xcx.code.not.blank=Mini program code cannot be blank diff --git a/ruoyi-admin/src/main/resources/i18n/messages_zh_CN.properties b/ruoyi-admin/src/main/resources/i18n/messages_zh_CN.properties index e1423a8fd..4ff55f41a 100644 --- a/ruoyi-admin/src/main/resources/i18n/messages_zh_CN.properties +++ b/ruoyi-admin/src/main/resources/i18n/messages_zh_CN.properties @@ -41,5 +41,5 @@ repeat.submit.message=不允许重复提交,请稍候再试 rate.limiter.message=访问过于频繁,请稍候再试 sms.code.not.blank=短信验证码不能为空 sms.code.retry.limit.count=短信验证码输入错误{0}次 -sms.code.retry.limit.exceed=短信验证码输入错误{0}次,帐户锁定{0}分钟 +sms.code.retry.limit.exceed=短信验证码输入错误{0}次,帐户锁定{1}分钟 xcx.code.not.blank=小程序code不能为空 From f70951d374cc7859c00edbf2685127ae3934529c Mon Sep 17 00:00:00 2001 From: zendwang Date: Mon, 5 Dec 2022 17:59:58 +0800 Subject: [PATCH 02/41] =?UTF-8?q?update=20=E5=8D=95=E5=85=83=E6=A0=BC?= =?UTF-8?q?=E5=90=88=E5=B9=B6=E5=88=A4=E6=96=ADcellValue=E6=98=AF=E5=90=A6?= =?UTF-8?q?=E7=9B=B8=E7=AD=89=E6=96=B9=E6=B3=95=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/ruoyi/common/excel/CellMergeStrategy.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/excel/CellMergeStrategy.java b/ruoyi-common/src/main/java/com/ruoyi/common/excel/CellMergeStrategy.java index 04a1bbb8a..6102eec50 100644 --- a/ruoyi-common/src/main/java/com/ruoyi/common/excel/CellMergeStrategy.java +++ b/ruoyi-common/src/main/java/com/ruoyi/common/excel/CellMergeStrategy.java @@ -86,7 +86,7 @@ public class CellMergeStrategy extends AbstractMergeStrategy { // 空值跳过不合并 continue; } - if (cellValue != val) { + if (!cellValue.equals(val)) { if (i - repeatCell.getCurrent() > 1) { cellList.add(new CellRangeAddress(repeatCell.getCurrent() + rowIndex, i + rowIndex - 1, colNum, colNum)); } From 2790b5ddc4536704c8bec617b2db234239336082 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=96=AF=E7=8B=82=E7=9A=84=E7=8B=AE=E5=AD=90li?= <15040126243@163.com> Date: Tue, 6 Dec 2022 10:51:58 +0800 Subject: [PATCH 03/41] =?UTF-8?q?fix=20=E4=BF=AE=E5=A4=8D=20=E8=AF=BB?= =?UTF-8?q?=E5=8F=96=20generator.yml=20=E4=B8=AD=E6=96=87=E4=B9=B1?= =?UTF-8?q?=E7=A0=81=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/ruoyi/generator/config/GenConfig.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ruoyi-generator/src/main/java/com/ruoyi/generator/config/GenConfig.java b/ruoyi-generator/src/main/java/com/ruoyi/generator/config/GenConfig.java index 92c522f0b..187426f7e 100644 --- a/ruoyi-generator/src/main/java/com/ruoyi/generator/config/GenConfig.java +++ b/ruoyi-generator/src/main/java/com/ruoyi/generator/config/GenConfig.java @@ -12,7 +12,7 @@ import org.springframework.stereotype.Component; */ @Component @ConfigurationProperties(prefix = "gen") -@PropertySource(value = {"classpath:generator.yml"}) +@PropertySource(value = {"classpath:generator.yml"}, encoding = "UTF-8") public class GenConfig { /** From 06cda3fb18a3241deff404f6948b02cc0d9a75a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=96=AF=E7=8B=82=E7=9A=84=E7=8B=AE=E5=AD=90li?= <15040126243@163.com> Date: Wed, 7 Dec 2022 19:13:58 +0800 Subject: [PATCH 04/41] =?UTF-8?q?update=20=E4=BC=98=E5=8C=96=20=E4=BD=BF?= =?UTF-8?q?=E7=94=A8=20spring=20=E4=BA=8B=E4=BB=B6=E6=9C=BA=E5=88=B6=20?= =?UTF-8?q?=E9=87=8D=E6=9E=84=20OssConfig=20=E7=BC=93=E5=AD=98=E6=9B=B4?= =?UTF-8?q?=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../common/utils/spring/SpringUtils.java | 9 +++++ .../service/impl/SysOssConfigServiceImpl.java | 34 +++++++++++-------- 2 files changed, 29 insertions(+), 14 deletions(-) diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/utils/spring/SpringUtils.java b/ruoyi-common/src/main/java/com/ruoyi/common/utils/spring/SpringUtils.java index ebc6d27f4..8b37e416d 100644 --- a/ruoyi-common/src/main/java/com/ruoyi/common/utils/spring/SpringUtils.java +++ b/ruoyi-common/src/main/java/com/ruoyi/common/utils/spring/SpringUtils.java @@ -3,6 +3,7 @@ package com.ruoyi.common.utils.spring; import cn.hutool.extra.spring.SpringUtil; import org.springframework.aop.framework.AopContext; import org.springframework.beans.factory.NoSuchBeanDefinitionException; +import org.springframework.context.ApplicationContext; import org.springframework.stereotype.Component; /** @@ -62,4 +63,12 @@ public final class SpringUtils extends SpringUtil { return (T) AopContext.currentProxy(); } + + /** + * 获取spring上下文 + */ + public static ApplicationContext context() { + return getApplicationContext(); + } + } diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysOssConfigServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysOssConfigServiceImpl.java index 8ceff7cb5..d6269242c 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysOssConfigServiceImpl.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysOssConfigServiceImpl.java @@ -16,6 +16,7 @@ import com.ruoyi.common.utils.JsonUtils; import com.ruoyi.common.utils.StringUtils; import com.ruoyi.common.utils.redis.CacheUtils; import com.ruoyi.common.utils.redis.RedisUtils; +import com.ruoyi.common.utils.spring.SpringUtils; import com.ruoyi.oss.constant.OssConstant; import com.ruoyi.oss.factory.OssFactory; import com.ruoyi.system.domain.SysOssConfig; @@ -25,6 +26,7 @@ import com.ruoyi.system.mapper.SysOssConfigMapper; import com.ruoyi.system.service.ISysOssConfigService; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; +import org.springframework.context.event.EventListener; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -57,7 +59,7 @@ public class SysOssConfigServiceImpl implements ISysOssConfigService { if ("0".equals(config.getStatus())) { RedisUtils.setCacheObject(OssConstant.DEFAULT_CONFIG_KEY, configKey); } - setConfigCache(true, config); + SpringUtils.context().publishEvent(config); } // 初始化OSS工厂 OssFactory.init(); @@ -88,7 +90,11 @@ public class SysOssConfigServiceImpl implements ISysOssConfigService { public Boolean insertByBo(SysOssConfigBo bo) { SysOssConfig config = BeanUtil.toBean(bo, SysOssConfig.class); validEntityBeforeSave(config); - return setConfigCache(baseMapper.insert(config) > 0, config); + boolean flag = baseMapper.insert(config) > 0; + if (flag) { + SpringUtils.context().publishEvent(config); + } + return flag; } @Override @@ -101,7 +107,11 @@ public class SysOssConfigServiceImpl implements ISysOssConfigService { luw.set(ObjectUtil.isNull(config.getExt1()), SysOssConfig::getExt1, ""); luw.set(ObjectUtil.isNull(config.getRemark()), SysOssConfig::getRemark, ""); luw.eq(SysOssConfig::getOssConfigId, config.getOssConfigId()); - return setConfigCache(baseMapper.update(config, luw) > 0, config); + boolean flag = baseMapper.update(config, luw) > 0; + if (flag) { + SpringUtils.context().publishEvent(config); + } + return flag; } /** @@ -165,19 +175,15 @@ public class SysOssConfigServiceImpl implements ISysOssConfigService { } /** - * 如果操作成功 则更新缓存 + * 更新配置缓存 * - * @param flag 操作状态 * @param config 配置 - * @return 返回操作状态 */ - private boolean setConfigCache(boolean flag, SysOssConfig config) { - if (flag) { - CacheUtils.put(CacheNames.SYS_OSS_CONFIG, config.getConfigKey(), JsonUtils.toJsonString(config)); - RedisUtils.publish(OssConstant.DEFAULT_CONFIG_KEY, config.getConfigKey(), msg -> { - log.info("发布刷新OSS配置 => " + msg); - }); - } - return flag; + @EventListener + public void updateConfigCache(SysOssConfig config) { + CacheUtils.put(CacheNames.SYS_OSS_CONFIG, config.getConfigKey(), JsonUtils.toJsonString(config)); + RedisUtils.publish(OssConstant.DEFAULT_CONFIG_KEY, config.getConfigKey(), msg -> { + log.info("发布刷新OSS配置 => " + msg); + }); } } From 6e017c35f7a831173130343c425f3aa5a5f7001e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=96=AF=E7=8B=82=E7=9A=84=E7=8B=AE=E5=AD=90li?= <15040126243@163.com> Date: Wed, 7 Dec 2022 19:57:28 +0800 Subject: [PATCH 05/41] =?UTF-8?q?update=20=E4=BC=98=E5=8C=96=20=E6=8A=BD?= =?UTF-8?q?=E5=8F=96=20SysLoginService=20recordLogininfor=20=E8=AE=B0?= =?UTF-8?q?=E5=BD=95=E7=99=BB=E5=BD=95=E4=BF=A1=E6=81=AF=E6=96=B9=E6=B3=95?= =?UTF-8?q?=20=E7=AE=80=E5=8C=96=E6=97=A5=E5=BF=97=E8=AE=B0=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ruoyi/system/service/SysLoginService.java | 42 ++++++++++++------- 1 file changed, 27 insertions(+), 15 deletions(-) diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/SysLoginService.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/SysLoginService.java index a257fd988..cda6c76e1 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/SysLoginService.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/SysLoginService.java @@ -15,7 +15,9 @@ import com.ruoyi.common.core.service.LogininforService; import com.ruoyi.common.enums.DeviceType; import com.ruoyi.common.enums.LoginType; import com.ruoyi.common.enums.UserStatus; -import com.ruoyi.common.exception.user.*; +import com.ruoyi.common.exception.user.CaptchaException; +import com.ruoyi.common.exception.user.CaptchaExpireException; +import com.ruoyi.common.exception.user.UserException; import com.ruoyi.common.helper.LoginHelper; import com.ruoyi.common.utils.DateUtils; import com.ruoyi.common.utils.MessageUtils; @@ -76,7 +78,7 @@ public class SysLoginService { // 生成token LoginHelper.loginByDevice(loginUser, DeviceType.PC); - asyncService.recordLogininfor(username, Constants.LOGIN_SUCCESS, MessageUtils.message("user.login.success"), request); + recordLogininfor(username, Constants.LOGIN_SUCCESS, MessageUtils.message("user.login.success")); recordLoginInfo(user.getUserId(), username); return StpUtil.getTokenValue(); } @@ -85,21 +87,19 @@ public class SysLoginService { // 通过手机号查找用户 SysUser user = loadUserByPhonenumber(phonenumber); - HttpServletRequest request = ServletUtils.getRequest(); - checkLogin(LoginType.SMS, user.getUserName(), () -> !validateSmsCode(phonenumber, smsCode, request)); + checkLogin(LoginType.SMS, user.getUserName(), () -> !validateSmsCode(phonenumber, smsCode)); // 此处可根据登录用户的数据不同 自行创建 loginUser LoginUser loginUser = buildLoginUser(user); // 生成token LoginHelper.loginByDevice(loginUser, DeviceType.APP); - asyncService.recordLogininfor(user.getUserName(), Constants.LOGIN_SUCCESS, MessageUtils.message("user.login.success"), request); + recordLogininfor(user.getUserName(), Constants.LOGIN_SUCCESS, MessageUtils.message("user.login.success")); recordLoginInfo(user.getUserId(), user.getUserName()); return StpUtil.getTokenValue(); } public String xcxLogin(String xcxCode) { - HttpServletRequest request = ServletUtils.getRequest(); // xcxCode 为 小程序调用 wx.login 授权后获取 // todo 以下自行实现 // 校验 appid + appsrcret + xcxCode 调用登录凭证校验接口 获取 session_key 与 openid @@ -115,7 +115,7 @@ public class SysLoginService { // 生成token LoginHelper.loginByDevice(loginUser, DeviceType.XCX); - asyncService.recordLogininfor(user.getUserName(), Constants.LOGIN_SUCCESS, MessageUtils.message("user.login.success"), request); + recordLogininfor(user.getUserName(), Constants.LOGIN_SUCCESS, MessageUtils.message("user.login.success")); recordLoginInfo(user.getUserId(), user.getUserName()); return StpUtil.getTokenValue(); } @@ -127,18 +127,30 @@ public class SysLoginService { try { LoginUser loginUser = LoginHelper.getLoginUser(); StpUtil.logout(); - asyncService.recordLogininfor(loginUser.getUsername(), Constants.LOGOUT, MessageUtils.message("user.logout.success"), ServletUtils.getRequest()); + recordLogininfor(loginUser.getUsername(), Constants.LOGOUT, MessageUtils.message("user.logout.success")); } catch (NotLoginException ignored) { } } + /** + * 记录登录信息 + * + * @param username 用户名 + * @param status 状态 + * @param message 消息内容 + * @return + */ + private void recordLogininfor(String username, String status, String message) { + asyncService.recordLogininfor(username, status, message, ServletUtils.getRequest()); + } + /** * 校验短信验证码 */ - private boolean validateSmsCode(String phonenumber, String smsCode, HttpServletRequest request) { + private boolean validateSmsCode(String phonenumber, String smsCode) { String code = RedisUtils.getCacheObject(CacheConstants.CAPTCHA_CODE_KEY + phonenumber); if (StringUtils.isBlank(code)) { - asyncService.recordLogininfor(phonenumber, Constants.LOGIN_FAIL, MessageUtils.message("user.jcaptcha.expire"), request); + recordLogininfor(phonenumber, Constants.LOGIN_FAIL, MessageUtils.message("user.jcaptcha.expire")); throw new CaptchaExpireException(); } return code.equals(smsCode); @@ -156,11 +168,11 @@ public class SysLoginService { String captcha = RedisUtils.getCacheObject(verifyKey); RedisUtils.deleteObject(verifyKey); if (captcha == null) { - asyncService.recordLogininfor(username, Constants.LOGIN_FAIL, MessageUtils.message("user.jcaptcha.expire"), request); + recordLogininfor(username, Constants.LOGIN_FAIL, MessageUtils.message("user.jcaptcha.expire")); throw new CaptchaExpireException(); } if (!code.equalsIgnoreCase(captcha)) { - asyncService.recordLogininfor(username, Constants.LOGIN_FAIL, MessageUtils.message("user.jcaptcha.error"), request); + recordLogininfor(username, Constants.LOGIN_FAIL, MessageUtils.message("user.jcaptcha.error")); throw new CaptchaException(); } } @@ -255,7 +267,7 @@ public class SysLoginService { Integer errorNumber = RedisUtils.getCacheObject(errorKey); // 锁定时间内登录 则踢出 if (ObjectUtil.isNotNull(errorNumber) && errorNumber.equals(maxRetryCount)) { - asyncService.recordLogininfor(username, loginFail, MessageUtils.message(loginType.getRetryLimitExceed(), maxRetryCount, lockTime), request); + recordLogininfor(username, loginFail, MessageUtils.message(loginType.getRetryLimitExceed(), maxRetryCount, lockTime)); throw new UserException(loginType.getRetryLimitExceed(), maxRetryCount, lockTime); } @@ -265,12 +277,12 @@ public class SysLoginService { // 达到规定错误次数 则锁定登录 if (errorNumber.equals(maxRetryCount)) { RedisUtils.setCacheObject(errorKey, errorNumber, Duration.ofMinutes(lockTime)); - asyncService.recordLogininfor(username, loginFail, MessageUtils.message(loginType.getRetryLimitExceed(), maxRetryCount, lockTime), request); + recordLogininfor(username, loginFail, MessageUtils.message(loginType.getRetryLimitExceed(), maxRetryCount, lockTime)); throw new UserException(loginType.getRetryLimitExceed(), maxRetryCount, lockTime); } else { // 未达到规定错误次数 则递增 RedisUtils.setCacheObject(errorKey, errorNumber); - asyncService.recordLogininfor(username, loginFail, MessageUtils.message(loginType.getRetryLimitCount(), errorNumber), request); + recordLogininfor(username, loginFail, MessageUtils.message(loginType.getRetryLimitCount(), errorNumber)); throw new UserException(loginType.getRetryLimitCount(), errorNumber); } } From 4c8137daf2f9c49dd1bf0d3f24372929016358f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=96=AF=E7=8B=82=E7=9A=84=E7=8B=AE=E5=AD=90li?= <15040126243@163.com> Date: Wed, 7 Dec 2022 20:32:57 +0800 Subject: [PATCH 06/41] =?UTF-8?q?update=20=E4=BC=98=E5=8C=96=20=E4=BD=BF?= =?UTF-8?q?=E7=94=A8spring=E4=BA=8B=E4=BB=B6=E5=8F=91=E5=B8=83=E6=9C=BA?= =?UTF-8?q?=E5=88=B6=20=E9=87=8D=E6=9E=84=E7=99=BB=E5=BD=95=E6=97=A5?= =?UTF-8?q?=E5=BF=97=E4=B8=8E=E6=93=8D=E4=BD=9C=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../core/domain/event/LogininforEvent.java | 44 +++++++++++++++++++ .../OperLogEvent.java} | 6 +-- .../core/service/LogininforService.java | 14 ------ .../common/core/service/OperLogService.java | 15 ------- .../ruoyi/framework/aspectj/LogAspect.java | 13 +++--- .../ruoyi/framework/config/AsyncConfig.java | 2 +- .../ruoyi/system/service/SysLoginService.java | 11 +++-- .../system/service/SysRegisterService.java | 28 +++++++++--- .../impl/SysLogininforServiceImpl.java | 32 +++++++------- .../service/impl/SysOperLogServiceImpl.java | 14 +++--- 10 files changed, 107 insertions(+), 72 deletions(-) create mode 100644 ruoyi-common/src/main/java/com/ruoyi/common/core/domain/event/LogininforEvent.java rename ruoyi-common/src/main/java/com/ruoyi/common/core/domain/{dto/OperLogDTO.java => event/OperLogEvent.java} (92%) delete mode 100644 ruoyi-common/src/main/java/com/ruoyi/common/core/service/LogininforService.java delete mode 100644 ruoyi-common/src/main/java/com/ruoyi/common/core/service/OperLogService.java diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/event/LogininforEvent.java b/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/event/LogininforEvent.java new file mode 100644 index 000000000..733f97f91 --- /dev/null +++ b/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/event/LogininforEvent.java @@ -0,0 +1,44 @@ +package com.ruoyi.common.core.domain.event; + +import lombok.Data; + +import javax.servlet.http.HttpServletRequest; +import java.io.Serializable; + +/** + * 登录事件 + * + * @author Lion Li + */ + +@Data +public class LogininforEvent implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 用户账号 + */ + private String username; + + /** + * 登录状态 0成功 1失败 + */ + private String status; + + /** + * 提示消息 + */ + private String message; + + /** + * 请求体 + */ + private HttpServletRequest request; + + /** + * 其他参数 + */ + private Object[] args; + +} diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/dto/OperLogDTO.java b/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/event/OperLogEvent.java similarity index 92% rename from ruoyi-common/src/main/java/com/ruoyi/common/core/domain/dto/OperLogDTO.java rename to ruoyi-common/src/main/java/com/ruoyi/common/core/domain/event/OperLogEvent.java index 26bf67440..3a2997810 100644 --- a/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/dto/OperLogDTO.java +++ b/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/event/OperLogEvent.java @@ -1,4 +1,4 @@ -package com.ruoyi.common.core.domain.dto; +package com.ruoyi.common.core.domain.event; import lombok.Data; @@ -6,13 +6,13 @@ import java.io.Serializable; import java.util.Date; /** - * 通用操作日志实体 + * 操作日志事件 * * @author Lion Li */ @Data -public class OperLogDTO implements Serializable { +public class OperLogEvent implements Serializable { private static final long serialVersionUID = 1L; diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/core/service/LogininforService.java b/ruoyi-common/src/main/java/com/ruoyi/common/core/service/LogininforService.java deleted file mode 100644 index 91aee4369..000000000 --- a/ruoyi-common/src/main/java/com/ruoyi/common/core/service/LogininforService.java +++ /dev/null @@ -1,14 +0,0 @@ -package com.ruoyi.common.core.service; - -import javax.servlet.http.HttpServletRequest; - -/** - * 通用 系统访问日志 - * - * @author Lion Li - */ -public interface LogininforService { - - void recordLogininfor(String username, String status, String message, - HttpServletRequest request, Object... args); -} diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/core/service/OperLogService.java b/ruoyi-common/src/main/java/com/ruoyi/common/core/service/OperLogService.java deleted file mode 100644 index a3b27e6a7..000000000 --- a/ruoyi-common/src/main/java/com/ruoyi/common/core/service/OperLogService.java +++ /dev/null @@ -1,15 +0,0 @@ -package com.ruoyi.common.core.service; - -import com.ruoyi.common.core.domain.dto.OperLogDTO; -import org.springframework.scheduling.annotation.Async; - -/** - * 通用 操作日志 - * - * @author Lion Li - */ -public interface OperLogService { - - @Async - void recordOper(OperLogDTO operLogDTO); -} diff --git a/ruoyi-framework/src/main/java/com/ruoyi/framework/aspectj/LogAspect.java b/ruoyi-framework/src/main/java/com/ruoyi/framework/aspectj/LogAspect.java index 3b6a858a4..64ab736a6 100644 --- a/ruoyi-framework/src/main/java/com/ruoyi/framework/aspectj/LogAspect.java +++ b/ruoyi-framework/src/main/java/com/ruoyi/framework/aspectj/LogAspect.java @@ -4,8 +4,7 @@ import cn.hutool.core.lang.Dict; import cn.hutool.core.map.MapUtil; import cn.hutool.core.util.ObjectUtil; import com.ruoyi.common.annotation.Log; -import com.ruoyi.common.core.domain.dto.OperLogDTO; -import com.ruoyi.common.core.service.OperLogService; +import com.ruoyi.common.core.domain.event.OperLogEvent; import com.ruoyi.common.enums.BusinessStatus; import com.ruoyi.common.enums.HttpMethod; import com.ruoyi.common.helper.LoginHelper; @@ -67,7 +66,7 @@ public class LogAspect { try { // *========数据库日志=========*// - OperLogDTO operLog = new OperLogDTO(); + OperLogEvent operLog = new OperLogEvent(); operLog.setStatus(BusinessStatus.SUCCESS.ordinal()); // 请求的地址 String ip = ServletUtils.getClientIP(); @@ -87,8 +86,8 @@ public class LogAspect { operLog.setRequestMethod(ServletUtils.getRequest().getMethod()); // 处理设置注解上的参数 getControllerMethodDescription(joinPoint, controllerLog, operLog, jsonResult); - // 保存数据库 - SpringUtils.getBean(OperLogService.class).recordOper(operLog); + // 发布事件保存数据库 + SpringUtils.context().publishEvent(operLog); } catch (Exception exp) { // 记录本地异常日志 log.error("异常信息:{}", exp.getMessage()); @@ -103,7 +102,7 @@ public class LogAspect { * @param operLog 操作日志 * @throws Exception */ - public void getControllerMethodDescription(JoinPoint joinPoint, Log log, OperLogDTO operLog, Object jsonResult) throws Exception { + public void getControllerMethodDescription(JoinPoint joinPoint, Log log, OperLogEvent operLog, Object jsonResult) throws Exception { // 设置action动作 operLog.setBusinessType(log.businessType().ordinal()); // 设置标题 @@ -127,7 +126,7 @@ public class LogAspect { * @param operLog 操作日志 * @throws Exception 异常 */ - private void setRequestValue(JoinPoint joinPoint, OperLogDTO operLog) throws Exception { + private void setRequestValue(JoinPoint joinPoint, OperLogEvent operLog) throws Exception { String requestMethod = operLog.getRequestMethod(); if (HttpMethod.PUT.name().equals(requestMethod) || HttpMethod.POST.name().equals(requestMethod)) { String params = argsArrayToString(joinPoint.getArgs()); diff --git a/ruoyi-framework/src/main/java/com/ruoyi/framework/config/AsyncConfig.java b/ruoyi-framework/src/main/java/com/ruoyi/framework/config/AsyncConfig.java index 47898e3fa..d011b583d 100644 --- a/ruoyi-framework/src/main/java/com/ruoyi/framework/config/AsyncConfig.java +++ b/ruoyi-framework/src/main/java/com/ruoyi/framework/config/AsyncConfig.java @@ -18,7 +18,7 @@ import java.util.concurrent.ScheduledExecutorService; * * @author Lion Li */ -@EnableAsync +@EnableAsync(proxyTargetClass = true) @Configuration public class AsyncConfig extends AsyncConfigurerSupport { diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/SysLoginService.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/SysLoginService.java index cda6c76e1..551ed7a19 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/SysLoginService.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/SysLoginService.java @@ -7,11 +7,11 @@ import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.util.ObjectUtil; import com.ruoyi.common.constant.CacheConstants; import com.ruoyi.common.constant.Constants; +import com.ruoyi.common.core.domain.event.LogininforEvent; import com.ruoyi.common.core.domain.dto.RoleDTO; import com.ruoyi.common.core.domain.entity.SysUser; import com.ruoyi.common.core.domain.model.LoginUser; import com.ruoyi.common.core.domain.model.XcxLoginUser; -import com.ruoyi.common.core.service.LogininforService; import com.ruoyi.common.enums.DeviceType; import com.ruoyi.common.enums.LoginType; import com.ruoyi.common.enums.UserStatus; @@ -24,6 +24,7 @@ import com.ruoyi.common.utils.MessageUtils; import com.ruoyi.common.utils.ServletUtils; import com.ruoyi.common.utils.StringUtils; import com.ruoyi.common.utils.redis.RedisUtils; +import com.ruoyi.common.utils.spring.SpringUtils; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Value; @@ -46,7 +47,6 @@ public class SysLoginService { private final ISysUserService userService; private final ISysConfigService configService; - private final LogininforService asyncService; private final SysPermissionService permissionService; @Value("${user.password.maxRetryCount}") @@ -141,7 +141,12 @@ public class SysLoginService { * @return */ private void recordLogininfor(String username, String status, String message) { - asyncService.recordLogininfor(username, status, message, ServletUtils.getRequest()); + LogininforEvent logininforDTO = new LogininforEvent(); + logininforDTO.setUsername(username); + logininforDTO.setStatus(status); + logininforDTO.setMessage(message); + logininforDTO.setRequest(ServletUtils.getRequest()); + SpringUtils.context().publishEvent(logininforDTO); } /** diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/SysRegisterService.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/SysRegisterService.java index 983173d11..62cf40066 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/SysRegisterService.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/SysRegisterService.java @@ -4,9 +4,9 @@ import cn.dev33.satoken.secure.BCrypt; import com.ruoyi.common.constant.CacheConstants; import com.ruoyi.common.constant.Constants; import com.ruoyi.common.constant.UserConstants; +import com.ruoyi.common.core.domain.event.LogininforEvent; import com.ruoyi.common.core.domain.entity.SysUser; import com.ruoyi.common.core.domain.model.RegisterBody; -import com.ruoyi.common.core.service.LogininforService; import com.ruoyi.common.enums.UserType; import com.ruoyi.common.exception.user.CaptchaException; import com.ruoyi.common.exception.user.CaptchaExpireException; @@ -15,6 +15,7 @@ import com.ruoyi.common.utils.MessageUtils; import com.ruoyi.common.utils.ServletUtils; import com.ruoyi.common.utils.StringUtils; import com.ruoyi.common.utils.redis.RedisUtils; +import com.ruoyi.common.utils.spring.SpringUtils; import lombok.RequiredArgsConstructor; import org.springframework.stereotype.Service; @@ -31,7 +32,6 @@ public class SysRegisterService { private final ISysUserService userService; private final ISysConfigService configService; - private final LogininforService asyncService; /** * 注册 @@ -61,7 +61,7 @@ public class SysRegisterService { if (!regFlag) { throw new UserException("user.register.error"); } - asyncService.recordLogininfor(username, Constants.REGISTER, MessageUtils.message("user.register.success"), request); + recordLogininfor(username, Constants.REGISTER, MessageUtils.message("user.register.success")); } /** @@ -77,12 +77,30 @@ public class SysRegisterService { String captcha = RedisUtils.getCacheObject(verifyKey); RedisUtils.deleteObject(verifyKey); if (captcha == null) { - asyncService.recordLogininfor(username, Constants.REGISTER, MessageUtils.message("user.jcaptcha.expire"), request); + recordLogininfor(username, Constants.REGISTER, MessageUtils.message("user.jcaptcha.expire")); throw new CaptchaExpireException(); } if (!code.equalsIgnoreCase(captcha)) { - asyncService.recordLogininfor(username, Constants.REGISTER, MessageUtils.message("user.jcaptcha.error"), request); + recordLogininfor(username, Constants.REGISTER, MessageUtils.message("user.jcaptcha.error")); throw new CaptchaException(); } } + + /** + * 记录登录信息 + * + * @param username 用户名 + * @param status 状态 + * @param message 消息内容 + * @return + */ + private void recordLogininfor(String username, String status, String message) { + LogininforEvent logininforDTO = new LogininforEvent(); + logininforDTO.setUsername(username); + logininforDTO.setStatus(status); + logininforDTO.setMessage(message); + logininforDTO.setRequest(ServletUtils.getRequest()); + SpringUtils.context().publishEvent(logininforDTO); + } + } diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysLogininforServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysLogininforServiceImpl.java index 159db624e..1cd176f79 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysLogininforServiceImpl.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysLogininforServiceImpl.java @@ -6,8 +6,8 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.ruoyi.common.constant.Constants; import com.ruoyi.common.core.domain.PageQuery; +import com.ruoyi.common.core.domain.event.LogininforEvent; import com.ruoyi.common.core.page.TableDataInfo; -import com.ruoyi.common.core.service.LogininforService; import com.ruoyi.common.utils.ServletUtils; import com.ruoyi.common.utils.StringUtils; import com.ruoyi.common.utils.ip.AddressUtils; @@ -16,6 +16,7 @@ import com.ruoyi.system.mapper.SysLogininforMapper; import com.ruoyi.system.service.ISysLogininforService; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; +import org.springframework.context.event.EventListener; import org.springframework.scheduling.annotation.Async; import org.springframework.stereotype.Service; @@ -33,22 +34,19 @@ import java.util.Map; @RequiredArgsConstructor @Slf4j @Service -public class SysLogininforServiceImpl implements ISysLogininforService, LogininforService { +public class SysLogininforServiceImpl implements ISysLogininforService { private final SysLogininforMapper baseMapper; /** * 记录登录信息 * - * @param username 用户名 - * @param status 状态 - * @param message 消息 - * @param args 列表 + * @param logininforEvent 登录事件 */ @Async - @Override - public void recordLogininfor(final String username, final String status, final String message, - HttpServletRequest request, final Object... args) { + @EventListener + public void recordLogininfor(LogininforEvent logininforEvent) { + HttpServletRequest request = logininforEvent.getRequest(); final UserAgent userAgent = UserAgentUtil.parse(request.getHeader("User-Agent")); final String ip = ServletUtils.getClientIP(request); @@ -56,27 +54,27 @@ public class SysLogininforServiceImpl implements ISysLogininforService, Logininf StringBuilder s = new StringBuilder(); s.append(getBlock(ip)); s.append(address); - s.append(getBlock(username)); - s.append(getBlock(status)); - s.append(getBlock(message)); + s.append(getBlock(logininforEvent.getUsername())); + s.append(getBlock(logininforEvent.getStatus())); + s.append(getBlock(logininforEvent.getMessage())); // 打印信息到日志 - log.info(s.toString(), args); + log.info(s.toString(), logininforEvent.getArgs()); // 获取客户端操作系统 String os = userAgent.getOs().getName(); // 获取客户端浏览器 String browser = userAgent.getBrowser().getName(); // 封装对象 SysLogininfor logininfor = new SysLogininfor(); - logininfor.setUserName(username); + logininfor.setUserName(logininforEvent.getUsername()); logininfor.setIpaddr(ip); logininfor.setLoginLocation(address); logininfor.setBrowser(browser); logininfor.setOs(os); - logininfor.setMsg(message); + logininfor.setMsg(logininforEvent.getMessage()); // 日志状态 - if (StringUtils.equalsAny(status, Constants.LOGIN_SUCCESS, Constants.LOGOUT, Constants.REGISTER)) { + if (StringUtils.equalsAny(logininforEvent.getStatus(), Constants.LOGIN_SUCCESS, Constants.LOGOUT, Constants.REGISTER)) { logininfor.setStatus(Constants.SUCCESS); - } else if (Constants.LOGIN_FAIL.equals(status)) { + } else if (Constants.LOGIN_FAIL.equals(logininforEvent.getStatus())) { logininfor.setStatus(Constants.FAIL); } // 插入数据 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 8610d974f..28ac34cba 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 cn.hutool.core.util.ArrayUtil; 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 @@ import java.util.Map; */ @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); From 53ae4ea6bc1a1bb4e20b7591e7b4d42da8fcb05e Mon Sep 17 00:00:00 2001 From: houzhongfei <501777010@qq.com> Date: Wed, 14 Dec 2022 14:19:25 +0800 Subject: [PATCH 07/41] =?UTF-8?q?=C2=B7=E4=BC=98=E5=8C=96=EF=BC=9A?= =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=97=A0=E7=94=A8=E4=BE=9D=E8=B5=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/ruoyi/web/controller/system/SysLoginController.java | 2 -- 1 file changed, 2 deletions(-) diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysLoginController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysLoginController.java index a65cb6252..78c44e305 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysLoginController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysLoginController.java @@ -13,7 +13,6 @@ import com.ruoyi.system.domain.vo.RouterVo; import com.ruoyi.system.service.ISysMenuService; import com.ruoyi.system.service.ISysUserService; import com.ruoyi.system.service.SysLoginService; -import com.ruoyi.system.service.SysPermissionService; import lombok.RequiredArgsConstructor; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.GetMapping; @@ -39,7 +38,6 @@ public class SysLoginController { private final SysLoginService loginService; private final ISysMenuService menuService; private final ISysUserService userService; - private final SysPermissionService permissionService; /** * 登录方法 From 9ed60f22de26f724e68f89d30f2db9eef2c5d652 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=96=AF=E7=8B=82=E7=9A=84=E7=8B=AE=E5=AD=90Li?= <15040126243@163.com> Date: Wed, 14 Dec 2022 14:28:11 +0800 Subject: [PATCH 08/41] =?UTF-8?q?update=20=E4=BC=98=E5=8C=96=20minio?= =?UTF-8?q?=E5=AE=89=E8=A3=85=E8=AD=A6=E5=91=8A=20=E4=BD=BF=E7=94=A8?= =?UTF-8?q?=E6=96=B0=E7=89=88=E6=9C=AC=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- script/docker/docker-compose.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/script/docker/docker-compose.yml b/script/docker/docker-compose.yml index 496aaafa8..414069737 100644 --- a/script/docker/docker-compose.yml +++ b/script/docker/docker-compose.yml @@ -78,9 +78,9 @@ services: # 时区上海 TZ: Asia/Shanghai # 管理后台用户名 - MINIO_ACCESS_KEY: ruoyi + MINIO_ROOT_USER: ruoyi # 管理后台密码,最小8个字符 - MINIO_SECRET_KEY: ruoyi123 + MINIO_ROOT_PASSWORD: ruoyi123 # https需要指定域名 #MINIO_SERVER_URL: "https://xxx.com:9000" #MINIO_BROWSER_REDIRECT_URL: "https://xxx.com:9001" From 5117fe2958a1bcec82e09fce01e49bb0bc2e0ba4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=96=AF=E7=8B=82=E7=9A=84=E7=8B=AE=E5=AD=90Li?= <15040126243@163.com> Date: Wed, 14 Dec 2022 15:11:09 +0800 Subject: [PATCH 09/41] =?UTF-8?q?update=20=E5=90=8C=E6=AD=A5=20ruoyi=20?= =?UTF-8?q?=E7=9B=B8=E5=85=B3=E6=8F=90=E4=BA=A4=20*=20fix=20=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=20=E6=96=87=E4=BB=B6=E5=90=8D=E5=8C=85=E5=90=AB?= =?UTF-8?q?=E7=89=B9=E6=AE=8A=E5=AD=97=E7=AC=A6=EF=BC=88+=E3=80=81-?= =?UTF-8?q?=E3=80=81*...=EF=BC=89=E7=9A=84=E6=96=87=E4=BB=B6=E6=97=A0?= =?UTF-8?q?=E6=B3=95=E4=B8=8B=E8=BD=BD=E9=97=AE=E9=A2=98=20*=20update=20?= =?UTF-8?q?=E4=BC=98=E5=8C=96=20=E5=BC=B9=E7=AA=97=E5=86=85=E5=AE=B9?= =?UTF-8?q?=E8=BF=87=E5=A4=9A=E5=B1=95=E7=A4=BA=E4=B8=8D=E5=85=A8=E9=97=AE?= =?UTF-8?q?=E9=A2=98=20*=20update=20echarts=204.9.0=20=3D>=205.4.0=20*=20f?= =?UTF-8?q?ix=20=E4=BF=AE=E5=A4=8D=20Vue3=E6=A0=91=E5=BD=A2=E4=B8=8B?= =?UTF-8?q?=E6=8B=89=E4=B8=8D=E8=83=BD=E9=BB=98=E8=AE=A4=E9=80=89=E4=B8=AD?= =?UTF-8?q?=20*=20update=20=E4=BC=98=E5=8C=96=20=E5=88=A0=E9=99=A4fuse?= =?UTF-8?q?=E6=97=A0=E6=95=88=E9=80=89=E9=A1=B9maxPatternLength=20*=20fix?= =?UTF-8?q?=20=E4=BF=AE=E5=A4=8D=20=E4=BB=A3=E7=A0=81=E7=94=9F=E6=88=90?= =?UTF-8?q?=E5=9B=BE=E7=89=87/=E6=96=87=E4=BB=B6/=E5=8D=95=E9=80=89?= =?UTF-8?q?=E6=97=B6=E9=80=89=E6=8B=A9=E5=BF=85=E5=A1=AB=E6=97=A0=E6=B3=95?= =?UTF-8?q?=E6=A0=A1=E9=AA=8C=E9=97=AE=E9=A2=98=20*=20fix=20=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=20=E4=BF=AE=E6=94=B9=E5=8F=82=E6=95=B0=E9=94=AE?= =?UTF-8?q?=E5=90=8D=E6=97=B6=20=E6=9C=AA=E7=A7=BB=E9=99=A4=E8=BF=87?= =?UTF-8?q?=E6=9C=9F=E7=BC=93=E5=AD=98=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/resources/vm/vue/index-tree.vue.vm | 33 +++++++------- .../src/main/resources/vm/vue/index.vue.vm | 38 +++++++++------- .../resources/vm/vue/v3/index-tree.vue.vm | 44 ++++++++++--------- .../src/main/resources/vm/vue/v3/index.vue.vm | 40 +++++++++-------- .../service/impl/SysConfigServiceImpl.java | 4 ++ ruoyi-ui/package.json | 2 +- ruoyi-ui/src/assets/styles/ruoyi.scss | 4 ++ .../src/components/HeaderSearch/index.vue | 1 - ruoyi-ui/src/components/RightPanel/index.vue | 6 --- ruoyi-ui/src/plugins/download.js | 2 +- ruoyi-ui/src/views/dashboard/BarChart.vue | 2 +- ruoyi-ui/src/views/dashboard/LineChart.vue | 2 +- ruoyi-ui/src/views/dashboard/PieChart.vue | 2 +- ruoyi-ui/src/views/dashboard/RaddarChart.vue | 2 +- 14 files changed, 99 insertions(+), 83 deletions(-) diff --git a/ruoyi-generator/src/main/resources/vm/vue/index-tree.vue.vm b/ruoyi-generator/src/main/resources/vm/vue/index-tree.vue.vm index 4ad96df33..2bc699a20 100644 --- a/ruoyi-generator/src/main/resources/vm/vue/index-tree.vue.vm +++ b/ruoyi-generator/src/main/resources/vm/vue/index-tree.vue.vm @@ -186,11 +186,11 @@ #elseif($column.htmlType == "imageUpload") - + #elseif($column.htmlType == "fileUpload") - + #elseif($column.htmlType == "editor") @@ -204,8 +204,11 @@ v-for="dict in dict.type.${dictType}" :key="dict.value" :label="dict.label" - #if($column.javaType == "Integer" || $column.javaType == "Long"):value="parseInt(dict.value)"#else:value="dict.value"#end - +#if($column.javaType == "Integer" || $column.javaType == "Long") + :value="parseInt(dict.value)" +#else + :value="dict.value" +#end > @@ -216,7 +219,7 @@ #elseif($column.htmlType == "checkbox" && "" != $dictType) - + #elseif($column.htmlType == "checkbox" && $dictType) - + 请选择字典生成 #elseif($column.htmlType == "radio" && "" != $dictType) - + {{dict.label}} #elseif($column.htmlType == "radio" && $dictType) - + 请选择字典生成 @@ -335,7 +341,7 @@ export default { #set($comment=$column.columnComment) #end $column.javaField: [ - { required: true, message: "$comment不能为空", trigger: #if($column.htmlType == "select")"change"#else"blur"#end } + { required: true, message: "$comment不能为空", trigger: #if($column.htmlType == "select" || $column.htmlType == "radio")"change"#else"blur"#end } ]#if($foreach.count != $columns.size()),#end #end #end @@ -398,10 +404,7 @@ export default { reset() { this.form = { #foreach ($column in $columns) -#if($column.htmlType == "radio") - $column.javaField: #if($column.javaType == "Integer" || $column.javaType == "Long")0#else"0"#end#if($foreach.count != $columns.size()),#end - -#elseif($column.htmlType == "checkbox") +#if($column.htmlType == "checkbox") $column.javaField: []#if($foreach.count != $columns.size()),#end #else $column.javaField: null#if($foreach.count != $columns.size()),#end diff --git a/ruoyi-generator/src/main/resources/vm/vue/index.vue.vm b/ruoyi-generator/src/main/resources/vm/vue/index.vue.vm index 7a57c7fde..e645b6bb8 100644 --- a/ruoyi-generator/src/main/resources/vm/vue/index.vue.vm +++ b/ruoyi-generator/src/main/resources/vm/vue/index.vue.vm @@ -133,9 +133,9 @@ #elseif($column.list && $column.htmlType == "imageUpload") - + #elseif($column.list && $column.dictType && "" != $column.dictType) @@ -197,11 +197,11 @@ #elseif($column.htmlType == "imageUpload") - + #elseif($column.htmlType == "fileUpload") - + #elseif($column.htmlType == "editor") @@ -215,8 +215,11 @@ v-for="dict in dict.type.${dictType}" :key="dict.value" :label="dict.label" - #if($column.javaType == "Integer" || $column.javaType == "Long"):value="parseInt(dict.value)"#else:value="dict.value"#end - +#if($column.javaType == "Integer" || $column.javaType == "Long") + :value="parseInt(dict.value)" +#else + :value="dict.value" +#end > @@ -227,7 +230,7 @@ #elseif($column.htmlType == "checkbox" && "" != $dictType) - + #elseif($column.htmlType == "checkbox" && $dictType) - + 请选择字典生成 #elseif($column.htmlType == "radio" && "" != $dictType) - + {{dict.label}} #elseif($column.htmlType == "radio" && $dictType) - + 请选择字典生成 @@ -412,7 +418,7 @@ export default { #set($comment=$column.columnComment) #end $column.javaField: [ - { required: true, message: "$comment不能为空", trigger: #if($column.htmlType == "select")"change"#else"blur"#end } + { required: true, message: "$comment不能为空", trigger: #if($column.htmlType == "select" || $column.htmlType == "radio")"change"#else"blur"#end } ]#if($foreach.count != $columns.size()),#end #end #end @@ -456,9 +462,7 @@ export default { reset() { this.form = { #foreach ($column in $columns) -#if($column.htmlType == "radio") - $column.javaField: #if($column.javaType == "Integer" || $column.javaType == "Long")0#else"0"#end#if($foreach.count != $columns.size()),#end -#elseif($column.htmlType == "checkbox") +#if($column.htmlType == "checkbox") $column.javaField: []#if($foreach.count != $columns.size()),#end #else $column.javaField: undefined#if($foreach.count != $columns.size()),#end diff --git a/ruoyi-generator/src/main/resources/vm/vue/v3/index-tree.vue.vm b/ruoyi-generator/src/main/resources/vm/vue/v3/index-tree.vue.vm index 01a7367f8..531cdc37b 100644 --- a/ruoyi-generator/src/main/resources/vm/vue/v3/index-tree.vue.vm +++ b/ruoyi-generator/src/main/resources/vm/vue/v3/index-tree.vue.vm @@ -135,11 +135,11 @@ #end #end - + @@ -165,6 +165,7 @@ value-key="${treeCode}" placeholder="请选择${comment}" check-strictly + :render-after-expand="false" /> #elseif($column.htmlType == "input") @@ -172,11 +173,11 @@ #elseif($column.htmlType == "imageUpload") - + #elseif($column.htmlType == "fileUpload") - + #elseif($column.htmlType == "editor") @@ -190,8 +191,11 @@ v-for="dict in ${dictType}" :key="dict.value" :label="dict.label" - #if($column.javaType == "Integer" || $column.javaType == "Long"):value="parseInt(dict.value)"#else:value="dict.value"#end - +#if($column.javaType == "Integer" || $column.javaType == "Long") + :value="parseInt(dict.value)" +#else + :value="dict.value" +#end > @@ -202,7 +206,7 @@ #elseif($column.htmlType == "checkbox" && "" != $dictType) - + #elseif($column.htmlType == "checkbox" && $dictType) - + 请选择字典生成 #elseif($column.htmlType == "radio" && "" != $dictType) - + {{dict.label}} #elseif($column.htmlType == "radio" && $dictType) - + 请选择字典生成 @@ -306,7 +313,7 @@ const data = reactive({ #set($comment=$column.columnComment) #end $column.javaField: [ - { required: true, message: "$comment不能为空", trigger: #if($column.htmlType == "select")"change"#else"blur"#end } + { required: true, message: "$comment不能为空", trigger: #if($column.htmlType == "select" || $column.htmlType == "radio")"change"#else"blur"#end } ]#if($foreach.count != $columns.size()),#end #end #end @@ -359,10 +366,7 @@ function cancel() { function reset() { form.value = { #foreach ($column in $columns) -#if($column.htmlType == "radio") - $column.javaField: #if($column.javaType == "Integer" || $column.javaType == "Long")0#else"0"#end#if($foreach.count != $columns.size()),#end - -#elseif($column.htmlType == "checkbox") +#if($column.htmlType == "checkbox") $column.javaField: []#if($foreach.count != $columns.size()),#end #else $column.javaField: null#if($foreach.count != $columns.size()),#end diff --git a/ruoyi-generator/src/main/resources/vm/vue/v3/index.vue.vm b/ruoyi-generator/src/main/resources/vm/vue/v3/index.vue.vm index d0f4f8bc8..a93922ef5 100644 --- a/ruoyi-generator/src/main/resources/vm/vue/v3/index.vue.vm +++ b/ruoyi-generator/src/main/resources/vm/vue/v3/index.vue.vm @@ -147,10 +147,10 @@ #end #end - + @@ -180,11 +180,11 @@ #elseif($column.htmlType == "imageUpload") - + #elseif($column.htmlType == "fileUpload") - + #elseif($column.htmlType == "editor") @@ -198,8 +198,11 @@ v-for="dict in ${dictType}" :key="dict.value" :label="dict.label" - #if($column.javaType == "Integer" || $column.javaType == "Long"):value="parseInt(dict.value)"#else:value="dict.value"#end - +#if($column.javaType == "Integer" || $column.javaType == "Long") + :value="parseInt(dict.value)" +#else + :value="dict.value" +#end > @@ -210,7 +213,7 @@ #elseif($column.htmlType == "checkbox" && "" != $dictType) - + #elseif($column.htmlType == "checkbox" && $dictType) - + 请选择字典生成 #elseif($column.htmlType == "radio" && "" != $dictType) - + {{dict.label}} #elseif($column.htmlType == "radio" && $dictType) - + 请选择字典生成 @@ -387,7 +393,7 @@ const data = reactive({ #set($comment=$column.columnComment) #end $column.javaField: [ - { required: true, message: "$comment不能为空", trigger: #if($column.htmlType == "select")"change"#else"blur"#end } + { required: true, message: "$comment不能为空", trigger: #if($column.htmlType == "select" || $column.htmlType == "radio")"change"#else"blur"#end } ]#if($foreach.count != $columns.size()),#end #end #end @@ -431,9 +437,7 @@ function cancel() { function reset() { form.value = { #foreach ($column in $columns) -#if($column.htmlType == "radio") - $column.javaField: #if($column.javaType == "Integer" || $column.javaType == "Long")0#else"0"#end#if($foreach.count != $columns.size()),#end -#elseif($column.htmlType == "checkbox") +#if($column.htmlType == "checkbox") $column.javaField: []#if($foreach.count != $columns.size()),#end #else $column.javaField: null#if($foreach.count != $columns.size()),#end diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysConfigServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysConfigServiceImpl.java index 72dc42bb4..31f4c1dc3 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysConfigServiceImpl.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysConfigServiceImpl.java @@ -136,6 +136,10 @@ public class SysConfigServiceImpl implements ISysConfigService, ConfigService { @CachePut(cacheNames = CacheNames.SYS_CONFIG, key = "#config.configKey") @Override public String updateConfig(SysConfig config) { + SysConfig temp = baseMapper.selectById(config.getConfigId()); + if (!StringUtils.equals(temp.getConfigKey(), config.getConfigKey())) { + CacheUtils.evict(CacheNames.SYS_CONFIG, temp.getConfigKey()); + } int row = 0; if (config.getConfigId() != null) { row = baseMapper.updateById(config); diff --git a/ruoyi-ui/package.json b/ruoyi-ui/package.json index 48ba1f9a4..61a89f433 100644 --- a/ruoyi-ui/package.json +++ b/ruoyi-ui/package.json @@ -39,7 +39,7 @@ "axios": "0.24.0", "clipboard": "2.0.8", "core-js": "3.25.3", - "echarts": "4.9.0", + "echarts": "5.4.0", "element-ui": "2.15.10", "file-saver": "2.0.5", "fuse.js": "6.4.3", diff --git a/ruoyi-ui/src/assets/styles/ruoyi.scss b/ruoyi-ui/src/assets/styles/ruoyi.scss index 16a4740f4..4e298744c 100644 --- a/ruoyi-ui/src/assets/styles/ruoyi.scss +++ b/ruoyi-ui/src/assets/styles/ruoyi.scss @@ -73,6 +73,10 @@ color: inherit; } +.el-message-box__status + .el-message-box__message{ + word-break: break-word; +} + .el-dialog:not(.is-fullscreen) { margin-top: 6vh !important; } diff --git a/ruoyi-ui/src/components/HeaderSearch/index.vue b/ruoyi-ui/src/components/HeaderSearch/index.vue index c44eff56e..c4d76bbb9 100644 --- a/ruoyi-ui/src/components/HeaderSearch/index.vue +++ b/ruoyi-ui/src/components/HeaderSearch/index.vue @@ -90,7 +90,6 @@ export default { threshold: 0.4, location: 0, distance: 100, - maxPatternLength: 32, minMatchCharLength: 1, keys: [{ name: 'title', diff --git a/ruoyi-ui/src/components/RightPanel/index.vue b/ruoyi-ui/src/components/RightPanel/index.vue index 2d6122bc0..5abeecb00 100644 --- a/ruoyi-ui/src/components/RightPanel/index.vue +++ b/ruoyi-ui/src/components/RightPanel/index.vue @@ -39,7 +39,6 @@ export default { } }, mounted() { - this.insertToBody() this.addEventClick() }, beforeDestroy() { @@ -56,11 +55,6 @@ export default { this.show = false window.removeEventListener('click', this.closeSidebar) } - }, - insertToBody() { - const elx = this.$refs.rightPanel - const body = document.querySelector('body') - body.insertBefore(elx, body.firstChild) } } } diff --git a/ruoyi-ui/src/plugins/download.js b/ruoyi-ui/src/plugins/download.js index 85138bb17..a1b21dad9 100644 --- a/ruoyi-ui/src/plugins/download.js +++ b/ruoyi-ui/src/plugins/download.js @@ -21,7 +21,7 @@ export default { const isLogin = await blobValidate(res.data); if (isLogin) { const blob = new Blob([res.data], { type: 'application/octet-stream' }) - this.saveAs(blob, decodeURI(res.headers['download-filename'])) + this.saveAs(blob, decodeURIComponent(res.headers['download-filename'])) } else { this.printErrMsg(res.data); } diff --git a/ruoyi-ui/src/views/dashboard/BarChart.vue b/ruoyi-ui/src/views/dashboard/BarChart.vue index be0af34f8..88e7ef64c 100644 --- a/ruoyi-ui/src/views/dashboard/BarChart.vue +++ b/ruoyi-ui/src/views/dashboard/BarChart.vue @@ -3,7 +3,7 @@ + + + From c42229bc5435ecc7db0561029d09f55a4680282d Mon Sep 17 00:00:00 2001 From: baymax <862592396@qq.com> Date: Sun, 25 Dec 2022 22:15:31 +0800 Subject: [PATCH 24/41] =?UTF-8?q?=E4=BC=98=E5=8C=96:=20=E7=A7=BB=E9=99=A4?= =?UTF-8?q?=20UserOnlineDTO=20=E5=AF=BC=E5=85=A5=E4=BD=86=E6=9C=AA?= =?UTF-8?q?=E4=BD=BF=E7=94=A8=E7=9A=84=E7=B1=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/ruoyi/common/core/domain/dto/UserOnlineDTO.java | 1 - 1 file changed, 1 deletion(-) diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/dto/UserOnlineDTO.java b/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/dto/UserOnlineDTO.java index 29ce1d1e7..cdd3905a3 100644 --- a/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/dto/UserOnlineDTO.java +++ b/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/dto/UserOnlineDTO.java @@ -1,6 +1,5 @@ package com.ruoyi.common.core.domain.dto; -import lombok.Builder; import lombok.Data; import lombok.NoArgsConstructor; From 346a3cf7f154af951665b1a7bf734eed01bb48bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=96=AF=E7=8B=82=E7=9A=84=E7=8B=AE=E5=AD=90Li?= <15040126243@163.com> Date: Mon, 26 Dec 2022 11:11:14 +0800 Subject: [PATCH 25/41] =?UTF-8?q?update=20=E9=87=8D=E6=9E=84=20ExcelUtil?= =?UTF-8?q?=20=E5=85=A8=E5=AF=BC=E5=87=BA=E6=96=B9=E6=B3=95=E6=94=AF?= =?UTF-8?q?=E6=8C=81=20OutputStream=20=E6=B5=81=E5=AF=BC=E5=87=BA=20?= =?UTF-8?q?=E4=B8=8D=E5=B1=80=E9=99=90=E4=BA=8E=20response?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/ruoyi/common/utils/poi/ExcelUtil.java | 164 ++++++++++++------ 1 file changed, 113 insertions(+), 51 deletions(-) diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/utils/poi/ExcelUtil.java b/ruoyi-common/src/main/java/com/ruoyi/common/utils/poi/ExcelUtil.java index 3ff8fec40..211c6214c 100644 --- a/ruoyi-common/src/main/java/com/ruoyi/common/utils/poi/ExcelUtil.java +++ b/ruoyi-common/src/main/java/com/ruoyi/common/utils/poi/ExcelUtil.java @@ -24,6 +24,7 @@ import javax.servlet.ServletOutputStream; import javax.servlet.http.HttpServletResponse; import java.io.IOException; import java.io.InputStream; +import java.io.OutputStream; import java.io.UnsupportedEncodingException; import java.util.Collection; import java.util.List; @@ -84,7 +85,13 @@ public class ExcelUtil { * @param response 响应体 */ public static void exportExcel(List list, String sheetName, Class clazz, HttpServletResponse response) { - exportExcel(list, sheetName, clazz, false, response); + try { + resetResponse(sheetName, response); + ServletOutputStream os = response.getOutputStream(); + exportExcel(list, sheetName, clazz, false, os); + } catch (IOException e) { + throw new RuntimeException("导出Excel异常"); + } } /** @@ -100,23 +107,48 @@ public class ExcelUtil { try { resetResponse(sheetName, response); ServletOutputStream os = response.getOutputStream(); - ExcelWriterSheetBuilder builder = EasyExcel.write(os, clazz) - .autoCloseStream(false) - // 自动适配 - .registerWriteHandler(new LongestMatchColumnWidthStyleStrategy()) - // 大数值自动转换 防止失真 - .registerConverter(new ExcelBigNumberConvert()) - .sheet(sheetName); - if (merge) { - // 合并处理器 - builder.registerWriteHandler(new CellMergeStrategy(list, true)); - } - builder.doWrite(list); + exportExcel(list, sheetName, clazz, merge, os); } catch (IOException e) { throw new RuntimeException("导出Excel异常"); } } + /** + * 导出excel + * + * @param list 导出数据集合 + * @param sheetName 工作表的名称 + * @param clazz 实体类 + * @param os 输出流 + */ + public static void exportExcel(List list, String sheetName, Class clazz, OutputStream os) { + exportExcel(list, sheetName, clazz, false, os); + } + + /** + * 导出excel + * + * @param list 导出数据集合 + * @param sheetName 工作表的名称 + * @param clazz 实体类 + * @param merge 是否合并单元格 + * @param os 输出流 + */ + public static void exportExcel(List list, String sheetName, Class clazz, boolean merge, OutputStream os) { + ExcelWriterSheetBuilder builder = EasyExcel.write(os, clazz) + .autoCloseStream(false) + // 自动适配 + .registerWriteHandler(new LongestMatchColumnWidthStyleStrategy()) + // 大数值自动转换 防止失真 + .registerConverter(new ExcelBigNumberConvert()) + .sheet(sheetName); + if (merge) { + // 合并处理器 + builder.registerWriteHandler(new CellMergeStrategy(list, true)); + } + builder.doWrite(list); + } + /** * 单表多数据模板导出 模板格式为 {.属性} * @@ -125,31 +157,46 @@ public class ExcelUtil { * 例如: excel/temp.xlsx * 重点: 模板文件必须放置到启动类对应的 resource 目录下 * @param data 模板需要的数据 + * @param response 响应体 */ public static void exportTemplate(List data, String filename, String templatePath, HttpServletResponse response) { try { resetResponse(filename, response); - ClassPathResource templateResource = new ClassPathResource(templatePath); - ExcelWriter excelWriter = EasyExcel.write(response.getOutputStream()) - .withTemplate(templateResource.getStream()) - .autoCloseStream(false) - // 大数值自动转换 防止失真 - .registerConverter(new ExcelBigNumberConvert()) - .build(); - WriteSheet writeSheet = EasyExcel.writerSheet().build(); - if (CollUtil.isEmpty(data)) { - throw new IllegalArgumentException("数据为空"); - } - // 单表多数据导出 模板格式为 {.属性} - for (Object d : data) { - excelWriter.fill(d, writeSheet); - } - excelWriter.finish(); + ServletOutputStream os = response.getOutputStream(); + exportTemplate(data, templatePath, os); } catch (IOException e) { throw new RuntimeException("导出Excel异常"); } } + /** + * 单表多数据模板导出 模板格式为 {.属性} + * + * @param templatePath 模板路径 resource 目录下的路径包括模板文件名 + * 例如: excel/temp.xlsx + * 重点: 模板文件必须放置到启动类对应的 resource 目录下 + * @param data 模板需要的数据 + * @param os 输出流 + */ + public static void exportTemplate(List data, String templatePath, OutputStream os) { + ClassPathResource templateResource = new ClassPathResource(templatePath); + ExcelWriter excelWriter = EasyExcel.write(os) + .withTemplate(templateResource.getStream()) + .autoCloseStream(false) + // 大数值自动转换 防止失真 + .registerConverter(new ExcelBigNumberConvert()) + .build(); + WriteSheet writeSheet = EasyExcel.writerSheet().build(); + if (CollUtil.isEmpty(data)) { + throw new IllegalArgumentException("数据为空"); + } + // 单表多数据导出 模板格式为 {.属性} + for (Object d : data) { + excelWriter.fill(d, writeSheet); + } + excelWriter.finish(); + } + /** * 多表多数据模板导出 模板格式为 {key.属性} * @@ -158,37 +205,52 @@ public class ExcelUtil { * 例如: excel/temp.xlsx * 重点: 模板文件必须放置到启动类对应的 resource 目录下 * @param data 模板需要的数据 + * @param response 响应体 */ public static void exportTemplateMultiList(Map data, String filename, String templatePath, HttpServletResponse response) { try { resetResponse(filename, response); - ClassPathResource templateResource = new ClassPathResource(templatePath); - ExcelWriter excelWriter = EasyExcel.write(response.getOutputStream()) - .withTemplate(templateResource.getStream()) - .autoCloseStream(false) - // 大数值自动转换 防止失真 - .registerConverter(new ExcelBigNumberConvert()) - .build(); - WriteSheet writeSheet = EasyExcel.writerSheet().build(); - if (CollUtil.isEmpty(data)) { - throw new IllegalArgumentException("数据为空"); - } - for (Map.Entry map : data.entrySet()) { - // 设置列表后续还有数据 - FillConfig fillConfig = FillConfig.builder().forceNewRow(Boolean.TRUE).build(); - if (map.getValue() instanceof Collection) { - // 多表导出必须使用 FillWrapper - excelWriter.fill(new FillWrapper(map.getKey(), (Collection) map.getValue()), fillConfig, writeSheet); - } else { - excelWriter.fill(map.getValue(), writeSheet); - } - } - excelWriter.finish(); + ServletOutputStream os = response.getOutputStream(); + exportTemplateMultiList(data, templatePath, os); } catch (IOException e) { throw new RuntimeException("导出Excel异常"); } } + /** + * 多表多数据模板导出 模板格式为 {key.属性} + * + * @param templatePath 模板路径 resource 目录下的路径包括模板文件名 + * 例如: excel/temp.xlsx + * 重点: 模板文件必须放置到启动类对应的 resource 目录下 + * @param data 模板需要的数据 + * @param os 输出流 + */ + public static void exportTemplateMultiList(Map data, String templatePath, OutputStream os) { + ClassPathResource templateResource = new ClassPathResource(templatePath); + ExcelWriter excelWriter = EasyExcel.write(os) + .withTemplate(templateResource.getStream()) + .autoCloseStream(false) + // 大数值自动转换 防止失真 + .registerConverter(new ExcelBigNumberConvert()) + .build(); + WriteSheet writeSheet = EasyExcel.writerSheet().build(); + if (CollUtil.isEmpty(data)) { + throw new IllegalArgumentException("数据为空"); + } + for (Map.Entry map : data.entrySet()) { + // 设置列表后续还有数据 + FillConfig fillConfig = FillConfig.builder().forceNewRow(Boolean.TRUE).build(); + if (map.getValue() instanceof Collection) { + // 多表导出必须使用 FillWrapper + excelWriter.fill(new FillWrapper(map.getKey(), (Collection) map.getValue()), fillConfig, writeSheet); + } else { + excelWriter.fill(map.getValue(), writeSheet); + } + } + excelWriter.finish(); + } + /** * 重置响应体 */ From 4761237849a4208530d2b187cd6f96d58999d86e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=96=AF=E7=8B=82=E7=9A=84=E7=8B=AE=E5=AD=90li?= <15040126243@163.com> Date: Tue, 27 Dec 2022 09:45:32 +0800 Subject: [PATCH 26/41] =?UTF-8?q?update=20=E4=BC=98=E5=8C=96=20xss?= =?UTF-8?q?=E5=8C=85=E8=A3=85=E5=99=A8=20=E5=8F=98=E9=87=8F=E5=91=BD?= =?UTF-8?q?=E5=90=8D=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ruoyi/common/filter/XssHttpServletRequestWrapper.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/filter/XssHttpServletRequestWrapper.java b/ruoyi-common/src/main/java/com/ruoyi/common/filter/XssHttpServletRequestWrapper.java index 3646f1fee..a7fbd4ca9 100644 --- a/ruoyi-common/src/main/java/com/ruoyi/common/filter/XssHttpServletRequestWrapper.java +++ b/ruoyi-common/src/main/java/com/ruoyi/common/filter/XssHttpServletRequestWrapper.java @@ -33,12 +33,12 @@ public class XssHttpServletRequestWrapper extends HttpServletRequestWrapper { String[] values = super.getParameterValues(name); if (values != null) { int length = values.length; - String[] escapseValues = new String[length]; + String[] escapesValues = new String[length]; for (int i = 0; i < length; i++) { // 防xss攻击和过滤前后空格 - escapseValues[i] = HtmlUtil.cleanHtmlTag(values[i]).trim(); + escapesValues[i] = HtmlUtil.cleanHtmlTag(values[i]).trim(); } - return escapseValues; + return escapesValues; } return super.getParameterValues(name); } From d8585d0ee7a80ca0847e1b9f61396422fee24397 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=96=AF=E7=8B=82=E7=9A=84=E7=8B=AE=E5=AD=90li?= <15040126243@163.com> Date: Tue, 27 Dec 2022 09:46:36 +0800 Subject: [PATCH 27/41] =?UTF-8?q?update=20=E4=BC=98=E5=8C=96=20=E5=88=A0?= =?UTF-8?q?=E9=99=A4=20vue3=20=E6=A8=A1=E6=9D=BF=E6=97=A0=E7=94=A8?= =?UTF-8?q?=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-generator/src/main/resources/vm/vue/v3/index-tree.vue.vm | 1 - 1 file changed, 1 deletion(-) diff --git a/ruoyi-generator/src/main/resources/vm/vue/v3/index-tree.vue.vm b/ruoyi-generator/src/main/resources/vm/vue/v3/index-tree.vue.vm index 531cdc37b..663893a2c 100644 --- a/ruoyi-generator/src/main/resources/vm/vue/v3/index-tree.vue.vm +++ b/ruoyi-generator/src/main/resources/vm/vue/v3/index-tree.vue.vm @@ -165,7 +165,6 @@ value-key="${treeCode}" placeholder="请选择${comment}" check-strictly - :render-after-expand="false" /> #elseif($column.htmlType == "input") From a6f6562693ab430b76d3c4810defd03a5e19b3fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=96=AF=E7=8B=82=E7=9A=84=E7=8B=AE=E5=AD=90li?= <15040126243@163.com> Date: Tue, 27 Dec 2022 17:38:13 +0800 Subject: [PATCH 28/41] =?UTF-8?q?update=20=E4=BC=98=E5=8C=96=20=E7=B3=BB?= =?UTF-8?q?=E7=BB=9F=E7=99=BB=E5=BD=95=20=E4=BD=BF=E7=94=A8=E5=8D=95?= =?UTF-8?q?=E8=A1=A8=E6=9F=A5=E8=AF=A2=E6=A0=A1=E9=AA=8C=E7=94=A8=E6=88=B7?= =?UTF-8?q?=20=E9=81=BF=E5=85=8D=E5=A4=9A=E6=AC=A1join=E6=9F=A5=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ruoyi/system/service/SysLoginService.java | 27 +++++++++---------- 1 file changed, 12 insertions(+), 15 deletions(-) diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/SysLoginService.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/SysLoginService.java index 31f8c4717..d65a40486 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/SysLoginService.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/SysLoginService.java @@ -5,6 +5,7 @@ import cn.dev33.satoken.secure.BCrypt; import cn.dev33.satoken.stp.StpUtil; import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.util.ObjectUtil; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.ruoyi.common.constant.CacheConstants; import com.ruoyi.common.constant.Constants; import com.ruoyi.common.core.domain.event.LogininforEvent; @@ -25,6 +26,7 @@ import com.ruoyi.common.utils.ServletUtils; import com.ruoyi.common.utils.StringUtils; import com.ruoyi.common.utils.redis.RedisUtils; import com.ruoyi.common.utils.spring.SpringUtils; +import com.ruoyi.system.mapper.SysUserMapper; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Value; @@ -45,7 +47,7 @@ import java.util.function.Supplier; @Service public class SysLoginService { - private final ISysUserService userService; + private final SysUserMapper userMapper; private final ISysConfigService configService; private final SysPermissionService permissionService; @@ -183,33 +185,31 @@ public class SysLoginService { } private SysUser loadUserByUsername(String username) { - SysUser user = userService.selectUserByUserName(username); + SysUser user = userMapper.selectOne(new LambdaQueryWrapper() + .select(SysUser::getUserName, SysUser::getStatus) + .eq(SysUser::getUserName, username)); if (ObjectUtil.isNull(user)) { log.info("登录用户:{} 不存在.", username); throw new UserException("user.not.exists", username); - } else if (UserStatus.DELETED.getCode().equals(user.getDelFlag())) { - log.info("登录用户:{} 已被删除.", username); - throw new UserException("user.password.delete", username); } else if (UserStatus.DISABLE.getCode().equals(user.getStatus())) { log.info("登录用户:{} 已被停用.", username); throw new UserException("user.blocked", username); } - return user; + return userMapper.selectUserByUserName(username); } private SysUser loadUserByPhonenumber(String phonenumber) { - SysUser user = userService.selectUserByPhonenumber(phonenumber); + SysUser user = userMapper.selectOne(new LambdaQueryWrapper() + .select(SysUser::getPhonenumber, SysUser::getStatus) + .eq(SysUser::getPhonenumber, phonenumber)); if (ObjectUtil.isNull(user)) { log.info("登录用户:{} 不存在.", phonenumber); throw new UserException("user.not.exists", phonenumber); - } else if (UserStatus.DELETED.getCode().equals(user.getDelFlag())) { - log.info("登录用户:{} 已被删除.", phonenumber); - throw new UserException("user.password.delete", phonenumber); } else if (UserStatus.DISABLE.getCode().equals(user.getStatus())) { log.info("登录用户:{} 已被停用.", phonenumber); throw new UserException("user.blocked", phonenumber); } - return user; + return userMapper.selectUserByPhonenumber(phonenumber); } private SysUser loadUserByOpenid(String openid) { @@ -219,9 +219,6 @@ public class SysLoginService { if (ObjectUtil.isNull(user)) { log.info("登录用户:{} 不存在.", openid); // todo 用户不存在 业务逻辑自行实现 - } else if (UserStatus.DELETED.getCode().equals(user.getDelFlag())) { - log.info("登录用户:{} 已被删除.", openid); - // todo 用户已被删除 业务逻辑自行实现 } else if (UserStatus.DISABLE.getCode().equals(user.getStatus())) { log.info("登录用户:{} 已被停用.", openid); // todo 用户已被停用 业务逻辑自行实现 @@ -257,7 +254,7 @@ public class SysLoginService { sysUser.setLoginIp(ServletUtils.getClientIP()); sysUser.setLoginDate(DateUtils.getNowDate()); sysUser.setUpdateBy(username); - userService.updateUserProfile(sysUser); + userMapper.updateById(sysUser); } /** From 6ee30852606dc7d28a6838ac0d837714d8fc9aab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=96=AF=E7=8B=82=E7=9A=84=E7=8B=AE=E5=AD=90li?= <15040126243@163.com> Date: Wed, 28 Dec 2022 15:03:00 +0800 Subject: [PATCH 29/41] =?UTF-8?q?add=20=E5=A2=9E=E5=8A=A0=20GET=20?= =?UTF-8?q?=E8=AF=B7=E6=B1=82=E6=8F=90=E4=BA=A4=E6=97=A5=E6=9C=9F=E5=8F=82?= =?UTF-8?q?=E6=95=B0=20=E9=BB=98=E8=AE=A4=E6=A0=BC=E5=BC=8F=E5=8C=96?= =?UTF-8?q?=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-admin/src/main/resources/application.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ruoyi-admin/src/main/resources/application.yml b/ruoyi-admin/src/main/resources/application.yml index d625156c9..77c68e496 100644 --- a/ruoyi-admin/src/main/resources/application.yml +++ b/ruoyi-admin/src/main/resources/application.yml @@ -83,6 +83,9 @@ spring: restart: # 热部署开关 enabled: true + mvc: + format: + date-time: yyyy-MM-dd HH:mm:ss jackson: # 日期格式化 date-format: yyyy-MM-dd HH:mm:ss From f6f3db1701d0f15da82a76e53fa92675b8ed635d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=96=AF=E7=8B=82=E7=9A=84=E7=8B=AE=E5=AD=90li?= <15040126243@163.com> Date: Wed, 28 Dec 2022 16:26:18 +0800 Subject: [PATCH 30/41] update hutool 5.8.10 => 5.8.11 update aws-s3 1.12.349 => 1.12.373 update aliyun-sms 2.0.22 => 2.0.23 update tencent-sms 3.1.635 => 3.1.660 --- pom.xml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pom.xml b/pom.xml index 74e26cf65..7becef836 100644 --- a/pom.xml +++ b/pom.xml @@ -27,7 +27,7 @@ 1.33.0 3.5.2 3.9.1 - 5.8.10 + 5.8.11 4.10.0 2.7.9 3.19.0 @@ -41,10 +41,10 @@ 1.33 - 1.12.349 + 1.12.373 - 2.0.22 - 3.1.635 + 2.0.23 + 3.1.660 From 996835d12479b868a30c5e4a390cb7130c80831a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=96=AF=E7=8B=82=E7=9A=84=E7=8B=AE=E5=AD=90li?= <15040126243@163.com> Date: Wed, 28 Dec 2022 18:53:29 +0800 Subject: [PATCH 31/41] =?UTF-8?q?update=20=E4=BC=98=E5=8C=96=20=E6=9B=B4?= =?UTF-8?q?=E7=BB=86=E8=87=B4=E7=9A=84=20issue=20=E6=8F=90=E9=97=AE?= =?UTF-8?q?=E6=A8=A1=E6=9D=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitee/ISSUE_TEMPLATE.zh-CN.md | 38 ++++++++++++++++++++++++++- .gitee/PULL_REQUEST_TEMPLATE.zh-CN.md | 2 +- 2 files changed, 38 insertions(+), 2 deletions(-) diff --git a/.gitee/ISSUE_TEMPLATE.zh-CN.md b/.gitee/ISSUE_TEMPLATE.zh-CN.md index b6fcbea86..cf82237f3 100644 --- a/.gitee/ISSUE_TEMPLATE.zh-CN.md +++ b/.gitee/ISSUE_TEMPLATE.zh-CN.md @@ -1,13 +1,49 @@ ### 使用版本(未按照模板填写直接删除) +- jdk版本(带上尾号): 例如 1.8.0_202 +- 框架版本(项目启动时输出的版本号): 例如 4.4.0 +- 其他依赖版本(你觉得有必要的): + +### 问题前提 + +> 功能不好用 不会用 是否已经看过项目文档 +> 项目运行报错 是否已经拿着报错信息去百度 常见报错百度百度足以 +> 是否搜索过其他issue 一些已经解决的问题 会在issue内留下解决方法 +> 无法线上解决或者与框架无关的问题的欢迎加VIP群跟作者一对一谈 + +### 异常模块 + +> 此报错都涉及到那些系统模块 + +例如 ruoyi-system ruoyi-auth 等等 ### 问题描述 +> 越详细越容易直击问题所在 + +已知: XXX功能不好用 或 XXX数据不正常 等等 ### 希望结果 +> 想知道你觉得怎么样是正常或者合理的 + +希望功能可以有XXX结果 或者 XXX现象 ### 重现步骤 +> 作者并不知道这个问题是如何出现的 -### 报错信息(截图为主 请勿发混乱格式) \ No newline at end of file +- 1 +- 2 +- 3 + +### 相关代码与报错信息(请勿发混乱格式) + +> 代码可按照如下形式提供或者截图均可 越详细越好 +> 大多数问题都是 代码编写错误问题 逻辑问题 或者用法错误等问题 + +```java +public class XXX { + +} +``` \ No newline at end of file diff --git a/.gitee/PULL_REQUEST_TEMPLATE.zh-CN.md b/.gitee/PULL_REQUEST_TEMPLATE.zh-CN.md index f5ef7c154..ef11b85b0 100644 --- a/.gitee/PULL_REQUEST_TEMPLATE.zh-CN.md +++ b/.gitee/PULL_REQUEST_TEMPLATE.zh-CN.md @@ -1,7 +1,7 @@ ### 更改目的 解决了什么问题(请提交到dev分支) -### 描述 做了哪些改动 +### 改动逻辑 这么写的思路(让作者更好的理解你的意图) ### 测试 都做了哪些测试(未经过测试不采纳) \ No newline at end of file From d87dfd63971e204730d130741c1e485e48039953 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=96=AF=E7=8B=82=E7=9A=84=E7=8B=AE=E5=AD=90li?= <15040126243@163.com> Date: Thu, 29 Dec 2022 10:12:25 +0800 Subject: [PATCH 32/41] =?UTF-8?q?update=20mybatis-plus=203.5.2=20=3D>=203.?= =?UTF-8?q?5.3=20update=20=E4=BC=98=E5=8C=96=20=E6=95=B4=E7=90=86=E6=97=A0?= =?UTF-8?q?=E7=94=A8=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 8 ++------ ruoyi-common/pom.xml | 4 ---- .../com/ruoyi/demo/controller/queue/PriorityDemo.java | 3 +-- .../java/com/ruoyi/system/service/SysLoginService.java | 1 - 4 files changed, 3 insertions(+), 13 deletions(-) diff --git a/pom.xml b/pom.xml index 7becef836..7290eeb5f 100644 --- a/pom.xml +++ b/pom.xml @@ -25,7 +25,7 @@ 3.1.4 2.3 1.33.0 - 3.5.2 + 3.5.3 3.9.1 5.8.11 4.10.0 @@ -147,11 +147,7 @@ mybatis-plus-boot-starter ${mybatis-plus.version} - - com.baomidou - mybatis-plus-extension - ${mybatis-plus.version} - + p6spy diff --git a/ruoyi-common/pom.xml b/ruoyi-common/pom.xml index 90d29940b..f88534367 100644 --- a/ruoyi-common/pom.xml +++ b/ruoyi-common/pom.xml @@ -79,10 +79,6 @@ com.baomidou mybatis-plus-boot-starter - - com.baomidou - mybatis-plus-extension - diff --git a/ruoyi-demo/src/main/java/com/ruoyi/demo/controller/queue/PriorityDemo.java b/ruoyi-demo/src/main/java/com/ruoyi/demo/controller/queue/PriorityDemo.java index 320a640da..c86c92aa6 100644 --- a/ruoyi-demo/src/main/java/com/ruoyi/demo/controller/queue/PriorityDemo.java +++ b/ruoyi-demo/src/main/java/com/ruoyi/demo/controller/queue/PriorityDemo.java @@ -2,7 +2,6 @@ package com.ruoyi.demo.controller.queue; import lombok.Data; import lombok.NoArgsConstructor; -import org.jetbrains.annotations.NotNull; /** * 实体类 注意不允许使用内部类 否则会找不到类 @@ -17,7 +16,7 @@ public class PriorityDemo implements Comparable { private Integer orderNum; @Override - public int compareTo(@NotNull PriorityDemo other) { + public int compareTo(PriorityDemo other) { return Integer.compare(getOrderNum(), other.getOrderNum()); } } diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/SysLoginService.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/SysLoginService.java index d65a40486..3c29b85cf 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/SysLoginService.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/SysLoginService.java @@ -261,7 +261,6 @@ public class SysLoginService { * 登录校验 */ private void checkLogin(LoginType loginType, String username, Supplier supplier) { - HttpServletRequest request = ServletUtils.getRequest(); String errorKey = CacheConstants.PWD_ERR_CNT_KEY + username; String loginFail = Constants.LOGIN_FAIL; From 70f39cb1eecbb742dab0eb517a48a6bab8d0a576 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=96=AF=E7=8B=82=E7=9A=84=E7=8B=AE=E5=AD=90li?= <15040126243@163.com> Date: Thu, 29 Dec 2022 15:42:31 +0800 Subject: [PATCH 33/41] =?UTF-8?q?update=20=E4=BC=98=E5=8C=96=20=E4=BB=A3?= =?UTF-8?q?=E7=A0=81=E7=94=9F=E6=88=90=E4=B8=8E=E6=A1=86=E6=9E=B6=E4=B8=BB?= =?UTF-8?q?=E4=BD=93=E4=BD=BF=E7=94=A8=E7=9B=B8=E5=90=8C=E7=9A=84=E4=B8=BB?= =?UTF-8?q?=E9=94=AE=E7=94=9F=E6=88=90=E5=99=A8=20=E5=85=A8=E5=B1=80?= =?UTF-8?q?=E7=BB=9F=E4=B8=80=E9=81=BF=E5=85=8D=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ruoyi/generator/service/GenTableServiceImpl.java | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/ruoyi-generator/src/main/java/com/ruoyi/generator/service/GenTableServiceImpl.java b/ruoyi-generator/src/main/java/com/ruoyi/generator/service/GenTableServiceImpl.java index 7a80229b1..085589fb2 100644 --- a/ruoyi-generator/src/main/java/com/ruoyi/generator/service/GenTableServiceImpl.java +++ b/ruoyi-generator/src/main/java/com/ruoyi/generator/service/GenTableServiceImpl.java @@ -3,12 +3,11 @@ package com.ruoyi.generator.service; import cn.hutool.core.collection.CollUtil; import cn.hutool.core.io.IoUtil; import cn.hutool.core.lang.Dict; -import cn.hutool.core.lang.Snowflake; -import cn.hutool.core.util.IdUtil; import cn.hutool.core.util.ObjectUtil; import com.baomidou.dynamic.datasource.annotation.DS; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.incrementer.IdentifierGenerator; import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.ruoyi.common.constant.Constants; @@ -58,6 +57,7 @@ public class GenTableServiceImpl implements IGenTableService { private final GenTableMapper baseMapper; private final GenTableColumnMapper genTableColumnMapper; + private final IdentifierGenerator identifierGenerator; /** * 查询业务字段列表 @@ -205,10 +205,9 @@ public class GenTableServiceImpl implements IGenTableService { Map dataMap = new LinkedHashMap<>(); // 查询表信息 GenTable table = baseMapper.selectGenTableById(tableId); - Snowflake snowflake = IdUtil.getSnowflake(); List menuIds = new ArrayList<>(); for (int i = 0; i < 6; i++) { - menuIds.add(snowflake.nextId()); + menuIds.add(identifierGenerator.nextId(null).longValue()); } table.setMenuIds(menuIds); // 设置主子表信息 @@ -356,10 +355,9 @@ public class GenTableServiceImpl implements IGenTableService { private void generatorCode(String tableName, ZipOutputStream zip) { // 查询表信息 GenTable table = baseMapper.selectGenTableByName(tableName); - Snowflake snowflake = IdUtil.getSnowflake(); List menuIds = new ArrayList<>(); for (int i = 0; i < 6; i++) { - menuIds.add(snowflake.nextId()); + menuIds.add(identifierGenerator.nextId(null).longValue()); } table.setMenuIds(menuIds); // 设置主子表信息 From 85b4adf400b6fbcd3639b771393132e52ef1d80c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=96=AF=E7=8B=82=E7=9A=84=E7=8B=AE=E5=AD=90li?= <15040126243@163.com> Date: Thu, 29 Dec 2022 18:06:07 +0800 Subject: [PATCH 34/41] =?UTF-8?q?update=20=E4=BC=98=E5=8C=96=20=E5=B0=86?= =?UTF-8?q?=E7=8E=AF=E5=A2=83=E9=85=8D=E7=BD=AE=E6=94=BE=E5=88=B0pom?= =?UTF-8?q?=E6=96=87=E4=BB=B6=E4=B8=8A=E6=96=B9=20=E4=BE=BF=E4=BA=8E?= =?UTF-8?q?=E6=9F=A5=E7=9C=8B=E4=BD=BF=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 60 ++++++++++++++++++++++++++++----------------------------- 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/pom.xml b/pom.xml index 7290eeb5f..dc5983b1b 100644 --- a/pom.xml +++ b/pom.xml @@ -47,6 +47,36 @@ 3.1.660 + + + local + + + local + debug + + + + dev + + + dev + debug + + + + true + + + + prod + + prod + warn + + + + @@ -383,36 +413,6 @@ - - - local - - - local - debug - - - - dev - - - dev - debug - - - - true - - - - prod - - prod - warn - - - - From da1b18792b9ee43b0cc790ab31bbc25b925bb6cd Mon Sep 17 00:00:00 2001 From: zlyx <1242874891@qq.com> Date: Fri, 30 Dec 2022 16:50:44 +0800 Subject: [PATCH 35/41] =?UTF-8?q?refactor=20=E9=87=8D=E6=9E=84=20BaseMappe?= =?UTF-8?q?rPlus,=20=E5=BC=95=E5=85=A5=20MP=20V3.5.3=20=E5=B7=A5=E5=85=B7?= =?UTF-8?q?=E7=B1=BB=20Db=20=E8=BF=9B=E8=A1=8C=E6=89=B9=E9=87=8F=E5=A2=9E?= =?UTF-8?q?=E5=88=A0=E6=94=B9=E6=93=8D=E4=BD=9C=20;?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../common/core/mapper/BaseMapperPlus.java | 53 +++---------------- 1 file changed, 8 insertions(+), 45 deletions(-) diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/core/mapper/BaseMapperPlus.java b/ruoyi-common/src/main/java/com/ruoyi/common/core/mapper/BaseMapperPlus.java index 862887d16..0a8539ad6 100644 --- a/ruoyi-common/src/main/java/com/ruoyi/common/core/mapper/BaseMapperPlus.java +++ b/ruoyi-common/src/main/java/com/ruoyi/common/core/mapper/BaseMapperPlus.java @@ -4,16 +4,12 @@ import cn.hutool.core.collection.CollUtil; import cn.hutool.core.util.ObjectUtil; import com.baomidou.mybatisplus.core.conditions.Wrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; -import com.baomidou.mybatisplus.core.enums.SqlMethod; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.metadata.IPage; -import com.baomidou.mybatisplus.core.metadata.TableInfo; -import com.baomidou.mybatisplus.core.metadata.TableInfoHelper; import com.baomidou.mybatisplus.core.toolkit.*; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import com.baomidou.mybatisplus.extension.toolkit.SqlHelper; +import com.baomidou.mybatisplus.extension.toolkit.Db; import com.ruoyi.common.utils.BeanCopyUtils; -import org.apache.ibatis.binding.MapperMethod; import org.apache.ibatis.logging.Log; import org.apache.ibatis.logging.LogFactory; @@ -21,7 +17,6 @@ import java.io.Serializable; import java.util.Collection; import java.util.List; import java.util.Map; -import java.util.Objects; /** * 自定义 Mapper 接口, 实现 自定义扩展 @@ -37,8 +32,6 @@ public interface BaseMapperPlus extends BaseMapper { Log log = LogFactory.getLog(BaseMapperPlus.class); - int DEFAULT_BATCH_SIZE = 1000; - default Class currentVoClass() { return (Class) ReflectionKit.getSuperClassGenericType(this.getClass(), BaseMapperPlus.class, 2); } @@ -59,79 +52,49 @@ public interface BaseMapperPlus extends BaseMapper { * 批量插入 */ default boolean insertBatch(Collection entityList) { - return insertBatch(entityList, DEFAULT_BATCH_SIZE); + return Db.saveBatch(entityList); } /** * 批量更新 */ default boolean updateBatchById(Collection entityList) { - return updateBatchById(entityList, DEFAULT_BATCH_SIZE); + return Db.updateBatchById(entityList); } /** * 批量插入或更新 */ default boolean insertOrUpdateBatch(Collection entityList) { - return insertOrUpdateBatch(entityList, DEFAULT_BATCH_SIZE); + return Db.saveOrUpdateBatch(entityList); } /** * 批量插入(包含限制条数) */ default boolean insertBatch(Collection entityList, int batchSize) { - String sqlStatement = SqlHelper.getSqlStatement(this.currentMapperClass(), SqlMethod.INSERT_ONE); - return SqlHelper.executeBatch(this.currentModelClass(), log, entityList, batchSize, - (sqlSession, entity) -> sqlSession.insert(sqlStatement, entity)); + return Db.saveBatch(entityList, batchSize); } /** * 批量更新(包含限制条数) */ default boolean updateBatchById(Collection entityList, int batchSize) { - String sqlStatement = SqlHelper.getSqlStatement(this.currentMapperClass(), SqlMethod.UPDATE_BY_ID); - return SqlHelper.executeBatch(this.currentModelClass(), log, entityList, batchSize, - (sqlSession, entity) -> { - MapperMethod.ParamMap param = new MapperMethod.ParamMap<>(); - param.put(Constants.ENTITY, entity); - sqlSession.update(sqlStatement, param); - }); + return Db.updateBatchById(entityList, batchSize); } /** * 批量插入或更新(包含限制条数) */ default boolean insertOrUpdateBatch(Collection entityList, int batchSize) { - TableInfo tableInfo = TableInfoHelper.getTableInfo(this.currentModelClass()); - Assert.notNull(tableInfo, "error: can not execute. because can not find cache of TableInfo for entity!"); - String keyProperty = tableInfo.getKeyProperty(); - Assert.notEmpty(keyProperty, "error: can not execute. because can not find column for id from entity!"); - return SqlHelper.saveOrUpdateBatch(this.currentModelClass(), this.currentMapperClass(), log, entityList, batchSize, (sqlSession, entity) -> { - Object idVal = tableInfo.getPropertyValue(entity, keyProperty); - String sqlStatement = SqlHelper.getSqlStatement(this.currentMapperClass(), SqlMethod.SELECT_BY_ID); - return StringUtils.checkValNull(idVal) - || CollectionUtils.isEmpty(sqlSession.selectList(sqlStatement, entity)); - }, (sqlSession, entity) -> { - MapperMethod.ParamMap param = new MapperMethod.ParamMap<>(); - param.put(Constants.ENTITY, entity); - String sqlStatement = SqlHelper.getSqlStatement(this.currentMapperClass(), SqlMethod.UPDATE_BY_ID); - sqlSession.update(sqlStatement, param); - }); + return Db.saveOrUpdateBatch(entityList, batchSize); } /** * 插入或更新(包含限制条数) */ default boolean insertOrUpdate(T entity) { - if (null != entity) { - TableInfo tableInfo = TableInfoHelper.getTableInfo(this.currentModelClass()); - Assert.notNull(tableInfo, "error: can not execute. because can not find cache of TableInfo for entity!"); - String keyProperty = tableInfo.getKeyProperty(); - Assert.notEmpty(keyProperty, "error: can not execute. because can not find column for id from entity!"); - Object idVal = tableInfo.getPropertyValue(entity, tableInfo.getKeyProperty()); - return StringUtils.checkValNull(idVal) || Objects.isNull(selectById((Serializable) idVal)) ? insert(entity) > 0 : updateById(entity) > 0; - } - return false; + return Db.saveOrUpdate(entity); } default V selectVoById(Serializable id) { From dac463efa630d1378baebb99fec46b1dd147ecd4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=96=AF=E7=8B=82=E7=9A=84=E7=8B=AE=E5=AD=90li?= <15040126243@163.com> Date: Tue, 3 Jan 2023 11:52:22 +0800 Subject: [PATCH 36/41] update mybatis-plus 3.5.3 => 3.5.3.1 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index dc5983b1b..30d5132c8 100644 --- a/pom.xml +++ b/pom.xml @@ -25,7 +25,7 @@ 3.1.4 2.3 1.33.0 - 3.5.3 + 3.5.3.1 3.9.1 5.8.11 4.10.0 From 9ebaf936c13f7654dc5d58962872b7b4cd054a07 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=96=AF=E7=8B=82=E7=9A=84=E7=8B=AE=E5=AD=90Li?= <15040126243@163.com> Date: Sun, 8 Jan 2023 08:07:48 +0000 Subject: [PATCH 37/41] =?UTF-8?q?reset=20=E5=9B=9E=E6=BB=9A=20=E9=94=99?= =?UTF-8?q?=E8=AF=AF=E4=BC=98=E5=8C=96=E5=AF=BC=E8=87=B4=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 疯狂的狮子Li <15040126243@163.com> --- .../java/com/ruoyi/common/helper/LoginHelper.java | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/helper/LoginHelper.java b/ruoyi-common/src/main/java/com/ruoyi/common/helper/LoginHelper.java index 1cef0278b..05e370b5d 100644 --- a/ruoyi-common/src/main/java/com/ruoyi/common/helper/LoginHelper.java +++ b/ruoyi-common/src/main/java/com/ruoyi/common/helper/LoginHelper.java @@ -81,12 +81,18 @@ public class LoginHelper { LoginUser loginUser = getLoginUser(); if (ObjectUtil.isNull(loginUser)) { String loginId = StpUtil.getLoginIdAsString(); - String[] strs = StringUtils.split(loginId, JOIN_CODE); - if (!ArrayUtil.containsAny(strs, UserType.values())) { + String userId = null; + for (UserType value : UserType.values()) { + if (StringUtils.contains(loginId, value.getUserType())) { + String[] strs = StringUtils.split(loginId, JOIN_CODE); + // 用户id在总是在最后 + userId = strs[strs.length - 1]; + } + } + if (StringUtils.isBlank(userId)) { throw new UtilException("登录用户: LoginId异常 => " + loginId); } - // 用户id在总是在最后 - return Long.parseLong(strs[strs.length - 1]); + return Long.parseLong(userId); } return loginUser.getUserId(); } From 00b6ca5dfe5328444efca61afdff609228621ffd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=96=AF=E7=8B=82=E7=9A=84=E7=8B=AE=E5=AD=90li?= <15040126243@163.com> Date: Tue, 10 Jan 2023 17:40:42 +0800 Subject: [PATCH 38/41] update springboot-admin 2.7.9 => 2.7.10 update easyexcel 3.1.4 => 3.1.5 update redisson 3.19.0 => 3.19.1 --- pom.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pom.xml b/pom.xml index 30d5132c8..de150be38 100644 --- a/pom.xml +++ b/pom.xml @@ -22,15 +22,15 @@ 2.2.2 1.6.14 5.2.3 - 3.1.4 + 3.1.5 2.3 1.33.0 3.5.3.1 3.9.1 5.8.11 4.10.0 - 2.7.9 - 3.19.0 + 2.7.10 + 3.19.1 2.2.3 3.5.2 2.14.2 From d8b486c793848d560bb4f97db96ae38941f39ff9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=96=AF=E7=8B=82=E7=9A=84=E7=8B=AE=E5=AD=90li?= <15040126243@163.com> Date: Wed, 11 Jan 2023 15:12:32 +0800 Subject: [PATCH 39/41] =?UTF-8?q?remove=20=E5=88=A0=E9=99=A4=E9=94=99?= =?UTF-8?q?=E8=AF=AF=E6=8F=90=E4=BA=A4=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-admin/src/main/resources/application.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/ruoyi-admin/src/main/resources/application.yml b/ruoyi-admin/src/main/resources/application.yml index 77c68e496..0468a33ac 100644 --- a/ruoyi-admin/src/main/resources/application.yml +++ b/ruoyi-admin/src/main/resources/application.yml @@ -132,10 +132,6 @@ security: - /favicon.ico - /*/api-docs - /*/api-docs/** - - /swagger-ui/** - - /webjars/** - - /swagger-ui.html - - /doc.html # actuator 监控配置 - /actuator - /actuator/** From 52d33195ec8fd9c664c7cdf5b6a6c0836c099031 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=96=AF=E7=8B=82=E7=9A=84=E7=8B=AE=E5=AD=90li?= <15040126243@163.com> Date: Wed, 11 Jan 2023 15:24:35 +0800 Subject: [PATCH 40/41] update sa-token 1.33.0 => 1.34.0 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index de150be38..8afb73f2b 100644 --- a/pom.xml +++ b/pom.xml @@ -24,7 +24,7 @@ 5.2.3 3.1.5 2.3 - 1.33.0 + 1.34.0 3.5.3.1 3.9.1 5.8.11 From 242e26abee1dcf8b75b1d26b2c9f252a26512155 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=96=AF=E7=8B=82=E7=9A=84=E7=8B=AE=E5=AD=90li?= <15040126243@163.com> Date: Thu, 12 Jan 2023 09:54:54 +0800 Subject: [PATCH 41/41] =?UTF-8?q?=F0=9F=A7=A7=E5=8F=91=E5=B8=83=204.5.0=20?= =?UTF-8?q?=E6=96=B0=E6=98=A5=E7=89=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .run/ruoyi-monitor-admin.run.xml | 2 +- .run/ruoyi-server.run.xml | 2 +- .run/ruoyi-xxl-job-admin.run.xml | 2 +- README.md | 2 +- pom.xml | 4 ++-- ruoyi-admin/pom.xml | 2 +- ruoyi-common/pom.xml | 2 +- ruoyi-demo/pom.xml | 2 +- ruoyi-extend/pom.xml | 2 +- ruoyi-extend/ruoyi-monitor-admin/pom.xml | 2 +- ruoyi-extend/ruoyi-xxl-job-admin/pom.xml | 2 +- ruoyi-framework/pom.xml | 2 +- ruoyi-generator/pom.xml | 2 +- ruoyi-job/pom.xml | 2 +- ruoyi-oss/pom.xml | 2 +- ruoyi-sms/pom.xml | 2 +- ruoyi-system/pom.xml | 2 +- ruoyi-ui/package.json | 2 +- ruoyi-ui/src/views/index.vue | 2 +- script/docker/docker-compose.yml | 8 ++++---- 20 files changed, 24 insertions(+), 24 deletions(-) diff --git a/.run/ruoyi-monitor-admin.run.xml b/.run/ruoyi-monitor-admin.run.xml index 0eb44eec6..35b6b07f8 100644 --- a/.run/ruoyi-monitor-admin.run.xml +++ b/.run/ruoyi-monitor-admin.run.xml @@ -2,7 +2,7 @@ - diff --git a/.run/ruoyi-server.run.xml b/.run/ruoyi-server.run.xml index c75e92af0..c0c575bee 100644 --- a/.run/ruoyi-server.run.xml +++ b/.run/ruoyi-server.run.xml @@ -2,7 +2,7 @@ - diff --git a/.run/ruoyi-xxl-job-admin.run.xml b/.run/ruoyi-xxl-job-admin.run.xml index 2a30437f1..ae25907a8 100644 --- a/.run/ruoyi-xxl-job-admin.run.xml +++ b/.run/ruoyi-xxl-job-admin.run.xml @@ -2,7 +2,7 @@ - diff --git a/README.md b/README.md index 1fd86c0c4..728871149 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ [![License](https://img.shields.io/badge/License-MIT-blue.svg)](https://gitee.com/JavaLionLi/RuoYi-Vue-Plus/blob/master/LICENSE) [![使用IntelliJ IDEA开发维护](https://img.shields.io/badge/IntelliJ%20IDEA-提供支持-blue.svg)](https://www.jetbrains.com/?from=RuoYi-Vue-Plus)
-[![RuoYi-Vue-Plus](https://img.shields.io/badge/RuoYi_Vue_Plus-4.4.0-success.svg)](https://gitee.com/JavaLionLi/RuoYi-Vue-Plus) +[![RuoYi-Vue-Plus](https://img.shields.io/badge/RuoYi_Vue_Plus-4.5.0-success.svg)](https://gitee.com/JavaLionLi/RuoYi-Vue-Plus) [![Spring Boot](https://img.shields.io/badge/Spring%20Boot-2.7-blue.svg)]() [![JDK-8+](https://img.shields.io/badge/JDK-8-green.svg)]() [![JDK-11](https://img.shields.io/badge/JDK-11-green.svg)]() diff --git a/pom.xml b/pom.xml index 8afb73f2b..d17587a0f 100644 --- a/pom.xml +++ b/pom.xml @@ -6,14 +6,14 @@ com.ruoyi ruoyi-vue-plus - 4.4.0 + 4.5.0 RuoYi-Vue-Plus https://gitee.com/JavaLionLi/RuoYi-Vue-Plus RuoYi-Vue-Plus后台管理系统 - 4.4.0 + 4.5.0 2.7.7 UTF-8 UTF-8 diff --git a/ruoyi-admin/pom.xml b/ruoyi-admin/pom.xml index a588f62da..91baa5cfa 100644 --- a/ruoyi-admin/pom.xml +++ b/ruoyi-admin/pom.xml @@ -5,7 +5,7 @@ ruoyi-vue-plus com.ruoyi - 4.4.0 + 4.5.0 4.0.0 jar diff --git a/ruoyi-common/pom.xml b/ruoyi-common/pom.xml index f88534367..94896ecaa 100644 --- a/ruoyi-common/pom.xml +++ b/ruoyi-common/pom.xml @@ -5,7 +5,7 @@ ruoyi-vue-plus com.ruoyi - 4.4.0 + 4.5.0 4.0.0 diff --git a/ruoyi-demo/pom.xml b/ruoyi-demo/pom.xml index 46b45981d..31f712cbc 100644 --- a/ruoyi-demo/pom.xml +++ b/ruoyi-demo/pom.xml @@ -5,7 +5,7 @@ ruoyi-vue-plus com.ruoyi - 4.4.0 + 4.5.0 4.0.0 diff --git a/ruoyi-extend/pom.xml b/ruoyi-extend/pom.xml index 8b0e2fb67..a55645806 100644 --- a/ruoyi-extend/pom.xml +++ b/ruoyi-extend/pom.xml @@ -5,7 +5,7 @@ ruoyi-vue-plus com.ruoyi - 4.4.0 + 4.5.0 4.0.0 ruoyi-extend diff --git a/ruoyi-extend/ruoyi-monitor-admin/pom.xml b/ruoyi-extend/ruoyi-monitor-admin/pom.xml index 687d95853..19fc04e20 100644 --- a/ruoyi-extend/ruoyi-monitor-admin/pom.xml +++ b/ruoyi-extend/ruoyi-monitor-admin/pom.xml @@ -5,7 +5,7 @@ ruoyi-extend com.ruoyi - 4.4.0 + 4.5.0 4.0.0 jar diff --git a/ruoyi-extend/ruoyi-xxl-job-admin/pom.xml b/ruoyi-extend/ruoyi-xxl-job-admin/pom.xml index 9305051d9..7e65df583 100644 --- a/ruoyi-extend/ruoyi-xxl-job-admin/pom.xml +++ b/ruoyi-extend/ruoyi-xxl-job-admin/pom.xml @@ -4,7 +4,7 @@ ruoyi-extend com.ruoyi - 4.4.0 + 4.5.0 ruoyi-xxl-job-admin jar diff --git a/ruoyi-framework/pom.xml b/ruoyi-framework/pom.xml index 52e1b0651..072b5b2f2 100644 --- a/ruoyi-framework/pom.xml +++ b/ruoyi-framework/pom.xml @@ -5,7 +5,7 @@ ruoyi-vue-plus com.ruoyi - 4.4.0 + 4.5.0 4.0.0 diff --git a/ruoyi-generator/pom.xml b/ruoyi-generator/pom.xml index 3e55d4424..529048eed 100644 --- a/ruoyi-generator/pom.xml +++ b/ruoyi-generator/pom.xml @@ -5,7 +5,7 @@ ruoyi-vue-plus com.ruoyi - 4.4.0 + 4.5.0 4.0.0 diff --git a/ruoyi-job/pom.xml b/ruoyi-job/pom.xml index 4162183f4..1146c9254 100644 --- a/ruoyi-job/pom.xml +++ b/ruoyi-job/pom.xml @@ -5,7 +5,7 @@ ruoyi-vue-plus com.ruoyi - 4.4.0 + 4.5.0 4.0.0 jar diff --git a/ruoyi-oss/pom.xml b/ruoyi-oss/pom.xml index 78e618e95..d25f2b8df 100644 --- a/ruoyi-oss/pom.xml +++ b/ruoyi-oss/pom.xml @@ -5,7 +5,7 @@ ruoyi-vue-plus com.ruoyi - 4.4.0 + 4.5.0 4.0.0 diff --git a/ruoyi-sms/pom.xml b/ruoyi-sms/pom.xml index 0ebabbb25..7180b058a 100644 --- a/ruoyi-sms/pom.xml +++ b/ruoyi-sms/pom.xml @@ -5,7 +5,7 @@ ruoyi-vue-plus com.ruoyi - 4.4.0 + 4.5.0 4.0.0 diff --git a/ruoyi-system/pom.xml b/ruoyi-system/pom.xml index daa5aba7b..c1c28d9f8 100644 --- a/ruoyi-system/pom.xml +++ b/ruoyi-system/pom.xml @@ -5,7 +5,7 @@ ruoyi-vue-plus com.ruoyi - 4.4.0 + 4.5.0 4.0.0 diff --git a/ruoyi-ui/package.json b/ruoyi-ui/package.json index 61a89f433..c1975834f 100644 --- a/ruoyi-ui/package.json +++ b/ruoyi-ui/package.json @@ -1,6 +1,6 @@ { "name": "ruoyi-vue-plus", - "version": "4.4.0", + "version": "4.5.0", "description": "RuoYi-Vue-Plus后台管理系统", "author": "LionLi", "license": "MIT", diff --git a/ruoyi-ui/src/views/index.vue b/ruoyi-ui/src/views/index.vue index 52f1a8768..7f7008e43 100644 --- a/ruoyi-ui/src/views/index.vue +++ b/ruoyi-ui/src/views/index.vue @@ -114,7 +114,7 @@ export default { data() { return { // 版本号 - version: "4.4.0", + version: "4.5.0", }; }, methods: { diff --git a/script/docker/docker-compose.yml b/script/docker/docker-compose.yml index 414069737..f0a489875 100644 --- a/script/docker/docker-compose.yml +++ b/script/docker/docker-compose.yml @@ -100,7 +100,7 @@ services: network_mode: "host" ruoyi-server1: - image: ruoyi/ruoyi-server:4.4.0 + image: ruoyi/ruoyi-server:4.5.0 container_name: ruoyi-server1 environment: # 时区上海 @@ -115,7 +115,7 @@ services: network_mode: "host" ruoyi-server2: - image: "ruoyi/ruoyi-server:4.4.0" + image: "ruoyi/ruoyi-server:4.5.0" container_name: ruoyi-server2 environment: # 时区上海 @@ -130,7 +130,7 @@ services: network_mode: "host" ruoyi-monitor-admin: - image: ruoyi/ruoyi-monitor-admin:4.4.0 + image: ruoyi/ruoyi-monitor-admin:4.5.0 container_name: ruoyi-monitor-admin environment: # 时区上海 @@ -142,7 +142,7 @@ services: network_mode: "host" ruoyi-xxl-job-admin: - image: ruoyi/ruoyi-xxl-job-admin:4.4.0 + image: ruoyi/ruoyi-xxl-job-admin:4.5.0 container_name: ruoyi-xxl-job-admin environment: # 时区上海