Compare commits

..

6 Commits

Author SHA1 Message Date
丁磊
bd70fdc498 publish 2.0.27-scope-0.1
All checks were successful
/ local-deploy (push) Successful in 19s
2025-06-09 18:32:26 +08:00
丁磊
ceef7180f7 fix(login): 修改微信公众号登录授权级别
- 将 snsapi_userinfo 修改为 snsapi_base,以解决普通网页授权问题
2025-06-09 18:32:06 +08:00
曾文豪
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
14 changed files with 61 additions and 26 deletions

18
pom.xml
View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -170,7 +170,7 @@ public class LoginController {
extra = ""; extra = "";
} }
String configUrl = globalConfig.buildPath("/login/wxmp/oauth2/" + service + "?extra=" + extra); String configUrl = globalConfig.buildPath("/login/wxmp/oauth2/" + service + "?extra=" + extra);
String authorizationUrl = platformWxmpConfig.buildAuthorizationUrl(service, configUrl, "snsapi_userinfo"); String authorizationUrl = platformWxmpConfig.buildAuthorizationUrl(service, configUrl, "snsapi_base");
response.sendRedirect(authorizationUrl); response.sendRedirect(authorizationUrl);
} }

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -6,7 +6,7 @@
<parent> <parent>
<groupId>com.tiesheng.springboot-parent</groupId> <groupId>com.tiesheng.springboot-parent</groupId>
<artifactId>springboot-parent</artifactId> <artifactId>springboot-parent</artifactId>
<version>2.0.25</version> <version>2.0.27-scope-0.1</version>
</parent> </parent>
<artifactId>springboot-web</artifactId> <artifactId>springboot-web</artifactId>
@@ -30,9 +30,39 @@
<artifactId>spring-boot-starter-json</artifactId> <artifactId>spring-boot-starter-json</artifactId>
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
</exclusion> </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> </exclusions>
</dependency> </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 --> <!-- aspect -->
<dependency> <dependency>
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>

View File

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

View File

@@ -23,6 +23,7 @@ import com.tiesheng.web.util.ProcessSyncConsumer;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.util.Date;
import java.util.List; 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())) { if (tokenBean == null || StrUtil.isEmpty(tokenBean.getId())) {
return; return;
@@ -165,7 +166,7 @@ public class CoreLogService extends TsServiceBase<CoreLogOperationMapper, CoreLo
} }
CoreLogOperation operation = new CoreLogOperation(); CoreLogOperation operation = new CoreLogOperation();
operation.setCreateTime(DateUtil.date()); operation.setCreateTime(createTime);
operation.setUpdateTime(DateUtil.date()); operation.setUpdateTime(DateUtil.date());
operation.setUserId(requestUserInfo.getId()); operation.setUserId(requestUserInfo.getId());
operation.setUserName(requestUserInfo.getName()); operation.setUserName(requestUserInfo.getName());