Compare commits

...

4 Commits

Author SHA1 Message Date
曾文豪
2d8208e4dc publish 2.0.27
All checks were successful
/ local-deploy (push) Successful in 8m4s
2025-04-24 11:39:20 +08:00
曾文豪
c4ba637de7 build(springboot-util & springboot-web): 升级依赖版本 2025-04-24 11:38:56 +08:00
曾文豪
7b0b9e0925 feat(core-log): 添加操作日志时指定创建时间 2025-04-24 10:14:29 +08:00
曾文豪
463ddf1b1e publish 2.0.26
All checks were successful
/ local-deploy (push) Successful in 18s
2025-04-22 13:41:17 +08:00
13 changed files with 60 additions and 25 deletions

18
pom.xml
View File

@@ -6,7 +6,7 @@
<groupId>com.tiesheng.springboot-parent</groupId>
<artifactId>springboot-parent</artifactId>
<version>2.0.25</version>
<version>2.0.27</version>
<packaging>pom</packaging>
<name>springboot-parent</name>
<description>杭州铁晟科技有限公司基础依赖</description>
@@ -58,49 +58,49 @@
<dependency>
<groupId>com.tiesheng.springboot-parent</groupId>
<artifactId>springboot-database</artifactId>
<version>2.0.25</version>
<version>2.0.27</version>
</dependency>
<dependency>
<groupId>com.tiesheng.springboot-parent</groupId>
<artifactId>springboot-login</artifactId>
<version>2.0.25</version>
<version>2.0.27</version>
</dependency>
<dependency>
<groupId>com.tiesheng.springboot-parent</groupId>
<artifactId>springboot-web</artifactId>
<version>2.0.25</version>
<version>2.0.27</version>
</dependency>
<dependency>
<groupId>com.tiesheng.springboot-parent</groupId>
<artifactId>springboot-util</artifactId>
<version>2.0.25</version>
<version>2.0.27</version>
</dependency>
<dependency>
<groupId>com.tiesheng.springboot-parent</groupId>
<artifactId>springboot-platform</artifactId>
<version>2.0.25</version>
<version>2.0.27</version>
</dependency>
<dependency>
<groupId>com.tiesheng.springboot-parent</groupId>
<artifactId>springboot-message</artifactId>
<version>2.0.25</version>
<version>2.0.27</version>
</dependency>
<dependency>
<groupId>com.tiesheng.springboot-parent</groupId>
<artifactId>springboot-role</artifactId>
<version>2.0.25</version>
<version>2.0.27</version>
</dependency>
<dependency>
<groupId>com.tiesheng.springboot-parent</groupId>
<artifactId>springboot-annotation</artifactId>
<version>2.0.25</version>
<version>2.0.27</version>
</dependency>
<dependency>

View File

@@ -6,11 +6,11 @@
<parent>
<groupId>com.tiesheng.springboot-parent</groupId>
<artifactId>springboot-parent</artifactId>
<version>2.0.25</version>
<version>2.0.27</version>
</parent>
<artifactId>springboot-ademo</artifactId>
<version>2.0.25</version>
<version>2.0.27</version>
<properties>
<maven.compiler.source>8</maven.compiler.source>

View File

@@ -6,7 +6,7 @@
<parent>
<groupId>com.tiesheng.springboot-parent</groupId>
<artifactId>springboot-parent</artifactId>
<version>2.0.25</version>
<version>2.0.27</version>
</parent>
<artifactId>springboot-annotation</artifactId>

View File

@@ -6,7 +6,7 @@
<parent>
<groupId>com.tiesheng.springboot-parent</groupId>
<artifactId>springboot-parent</artifactId>
<version>2.0.25</version>
<version>2.0.27</version>
</parent>
<artifactId>springboot-database</artifactId>

View File

@@ -6,7 +6,7 @@
<parent>
<groupId>com.tiesheng.springboot-parent</groupId>
<artifactId>springboot-parent</artifactId>
<version>2.0.25</version>
<version>2.0.27</version>
</parent>
<artifactId>springboot-login</artifactId>

View File

@@ -6,7 +6,7 @@
<parent>
<groupId>com.tiesheng.springboot-parent</groupId>
<artifactId>springboot-parent</artifactId>
<version>2.0.25</version>
<version>2.0.27</version>
</parent>
<artifactId>springboot-message</artifactId>

View File

@@ -6,7 +6,7 @@
<parent>
<groupId>com.tiesheng.springboot-parent</groupId>
<artifactId>springboot-parent</artifactId>
<version>2.0.25</version>
<version>2.0.27</version>
</parent>
<artifactId>springboot-platform</artifactId>

View File

@@ -6,7 +6,7 @@
<parent>
<groupId>com.tiesheng.springboot-parent</groupId>
<artifactId>springboot-parent</artifactId>
<version>2.0.25</version>
<version>2.0.27</version>
</parent>
<artifactId>springboot-role</artifactId>

View File

@@ -6,7 +6,7 @@
<parent>
<groupId>com.tiesheng.springboot-parent</groupId>
<artifactId>springboot-parent</artifactId>
<version>2.0.25</version>
<version>2.0.27</version>
</parent>
<artifactId>springboot-util</artifactId>
@@ -82,7 +82,7 @@
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>8.0.30</version>
<version>8.0.33</version>
</dependency>
<dependency>
@@ -107,7 +107,7 @@
<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcprov-jdk15to18</artifactId>
<version>1.68</version>
<version>1.80</version>
</dependency>
<dependency>

View File

@@ -102,7 +102,7 @@ public class TsCacheService {
*/
public void checkRepeat(String key, String value, int seconds) {
String s = get(key);
if (Objects.equals(s, value)) {
if (StrUtil.isNotEmpty(s) && Objects.equals(s, value)) {
throw new ApiException("操作频繁,请稍后再试");
}
put(key, value, seconds);

View File

@@ -6,7 +6,7 @@
<parent>
<groupId>com.tiesheng.springboot-parent</groupId>
<artifactId>springboot-parent</artifactId>
<version>2.0.25</version>
<version>2.0.27</version>
</parent>
<artifactId>springboot-web</artifactId>
@@ -30,9 +30,39 @@
<artifactId>spring-boot-starter-json</artifactId>
<groupId>org.springframework.boot</groupId>
</exclusion>
<exclusion>
<groupId>org.apache.tomcat.embed</groupId>
<artifactId>tomcat-embed-core</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.tomcat.embed</groupId>
<artifactId>tomcat-embed-el</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.tomcat.embed</groupId>
<artifactId>tomcat-embed-websocket</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.tomcat.embed</groupId>
<artifactId>tomcat-embed-core</artifactId>
<version>9.0.104</version>
</dependency>
<dependency>
<groupId>org.apache.tomcat.embed</groupId>
<artifactId>tomcat-embed-el</artifactId>
<version>9.0.104</version>
</dependency>
<dependency>
<groupId>org.apache.tomcat.embed</groupId>
<artifactId>tomcat-embed-websocket</artifactId>
<version>9.0.104</version>
</dependency>
<!-- aspect -->
<dependency>
<groupId>org.springframework.boot</groupId>

View File

@@ -1,6 +1,8 @@
package com.tiesheng.web.config.operation;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.date.DateTime;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.map.MapUtil;
import cn.hutool.core.util.ArrayUtil;
import cn.hutool.core.util.StrUtil;
@@ -56,6 +58,8 @@ public class OperationAspect {
@Around("methodArgs()")
public Object around(ProceedingJoinPoint joinPoint) throws Throwable {
DateTime crateTime = DateUtil.date();
HttpServletRequest request = ServletKit.getRequest();
if (request == null) {
return joinPoint.proceed();
@@ -115,7 +119,7 @@ public class OperationAspect {
}
}
coreLogService.addOperationLog(
coreLogService.addOperationLog(crateTime,
tsTokenConfig.validToken(request, false), title, subject, reqMaps);
return response;

View File

@@ -23,6 +23,7 @@ import com.tiesheng.web.util.ProcessSyncConsumer;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.Date;
import java.util.List;
/**
@@ -154,7 +155,7 @@ public class CoreLogService extends TsServiceBase<CoreLogOperationMapper, CoreLo
/**
* 添加操作日志
*/
public void addOperationLog(TokenBean tokenBean, String title, String subject, Object params) {
public void addOperationLog(Date createTime, TokenBean tokenBean, String title, String subject, Object params) {
if (tokenBean == null || StrUtil.isEmpty(tokenBean.getId())) {
return;
@@ -165,7 +166,7 @@ public class CoreLogService extends TsServiceBase<CoreLogOperationMapper, CoreLo
}
CoreLogOperation operation = new CoreLogOperation();
operation.setCreateTime(DateUtil.date());
operation.setCreateTime(createTime);
operation.setUpdateTime(DateUtil.date());
operation.setUserId(requestUserInfo.getId());
operation.setUserName(requestUserInfo.getName());