Compare commits

...

2 Commits
0.1.4 ... 0.1.5

Author SHA1 Message Date
曾文豪
ec4b0cbb1e publish 0.1.5 2023-01-11 16:25:38 +08:00
曾文豪
30fd68d430 perf:调整授权登录 2023-01-11 16:25:27 +08:00
12 changed files with 31 additions and 21 deletions

20
pom.xml
View File

@@ -6,7 +6,7 @@
<groupId>com.tiesheng</groupId> <groupId>com.tiesheng</groupId>
<artifactId>springboot-parent</artifactId> <artifactId>springboot-parent</artifactId>
<version>0.1.4</version> <version>0.1.5</version>
<packaging>pom</packaging> <packaging>pom</packaging>
<name>springboot-parent</name> <name>springboot-parent</name>
<description>杭州铁晟科技有限公司基础依赖</description> <description>杭州铁晟科技有限公司基础依赖</description>
@@ -57,55 +57,55 @@
<dependency> <dependency>
<groupId>com.tiesheng</groupId> <groupId>com.tiesheng</groupId>
<artifactId>springboot-db-migration</artifactId> <artifactId>springboot-db-migration</artifactId>
<version>0.1.4</version> <version>0.1.5</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.tiesheng</groupId> <groupId>com.tiesheng</groupId>
<artifactId>springboot-login</artifactId> <artifactId>springboot-login</artifactId>
<version>0.1.4</version> <version>0.1.5</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.tiesheng</groupId> <groupId>com.tiesheng</groupId>
<artifactId>springboot-web</artifactId> <artifactId>springboot-web</artifactId>
<version>0.1.4</version> <version>0.1.5</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.tiesheng</groupId> <groupId>com.tiesheng</groupId>
<artifactId>springboot-util</artifactId> <artifactId>springboot-util</artifactId>
<version>0.1.4</version> <version>0.1.5</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.tiesheng</groupId> <groupId>com.tiesheng</groupId>
<artifactId>springboot-platform</artifactId> <artifactId>springboot-platform</artifactId>
<version>0.1.4</version> <version>0.1.5</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.tiesheng</groupId> <groupId>com.tiesheng</groupId>
<artifactId>springboot-message</artifactId> <artifactId>springboot-message</artifactId>
<version>0.1.4</version> <version>0.1.5</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.tiesheng</groupId> <groupId>com.tiesheng</groupId>
<artifactId>springboot-encrypt</artifactId> <artifactId>springboot-encrypt</artifactId>
<version>0.1.4</version> <version>0.1.5</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.tiesheng</groupId> <groupId>com.tiesheng</groupId>
<artifactId>springboot-annotation</artifactId> <artifactId>springboot-annotation</artifactId>
<version>0.1.4</version> <version>0.1.5</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.tiesheng</groupId> <groupId>com.tiesheng</groupId>
<artifactId>springboot-poi</artifactId> <artifactId>springboot-poi</artifactId>
<version>0.1.4</version> <version>0.1.5</version>
</dependency> </dependency>
<dependency> <dependency>

View File

@@ -6,7 +6,7 @@
<parent> <parent>
<groupId>com.tiesheng</groupId> <groupId>com.tiesheng</groupId>
<artifactId>springboot-parent</artifactId> <artifactId>springboot-parent</artifactId>
<version>0.1.4</version> <version>0.1.5</version>
</parent> </parent>
<artifactId>springboot-ademo</artifactId> <artifactId>springboot-ademo</artifactId>

View File

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

View File

@@ -6,7 +6,7 @@
<parent> <parent>
<groupId>com.tiesheng</groupId> <groupId>com.tiesheng</groupId>
<artifactId>springboot-parent</artifactId> <artifactId>springboot-parent</artifactId>
<version>0.1.4</version> <version>0.1.5</version>
</parent> </parent>
<artifactId>springboot-db-migration</artifactId> <artifactId>springboot-db-migration</artifactId>

View File

@@ -6,7 +6,7 @@
<parent> <parent>
<groupId>com.tiesheng</groupId> <groupId>com.tiesheng</groupId>
<artifactId>springboot-parent</artifactId> <artifactId>springboot-parent</artifactId>
<version>0.1.4</version> <version>0.1.5</version>
</parent> </parent>
<artifactId>springboot-encrypt</artifactId> <artifactId>springboot-encrypt</artifactId>

View File

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

View File

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

View File

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

View File

@@ -6,7 +6,7 @@
<parent> <parent>
<groupId>com.tiesheng</groupId> <groupId>com.tiesheng</groupId>
<artifactId>springboot-parent</artifactId> <artifactId>springboot-parent</artifactId>
<version>0.1.4</version> <version>0.1.5</version>
</parent> </parent>
<artifactId>springboot-poi</artifactId> <artifactId>springboot-poi</artifactId>

View File

@@ -6,7 +6,7 @@
<parent> <parent>
<groupId>com.tiesheng</groupId> <groupId>com.tiesheng</groupId>
<artifactId>springboot-parent</artifactId> <artifactId>springboot-parent</artifactId>
<version>0.1.4</version> <version>0.1.5</version>
</parent> </parent>
<artifactId>springboot-util</artifactId> <artifactId>springboot-util</artifactId>

View File

@@ -6,7 +6,7 @@
<parent> <parent>
<groupId>com.tiesheng</groupId> <groupId>com.tiesheng</groupId>
<artifactId>springboot-parent</artifactId> <artifactId>springboot-parent</artifactId>
<version>0.1.4</version> <version>0.1.5</version>
</parent> </parent>
<artifactId>springboot-web</artifactId> <artifactId>springboot-web</artifactId>

View File

@@ -1,12 +1,14 @@
package com.tiesheng.core.service; package com.tiesheng.core.service;
import cn.hutool.core.collection.CollUtil; import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.tiesheng.core.mapper.CorePlatformUniqueMapper; import com.tiesheng.core.mapper.CorePlatformUniqueMapper;
import com.tiesheng.core.pojos.dao.CorePlatformUnique; import com.tiesheng.core.pojos.dao.CorePlatformUnique;
import com.tiesheng.login.config.token.bean.TokenBean; import com.tiesheng.login.config.token.bean.TokenBean;
import com.tiesheng.login.pojos.DoLoginInfo; import com.tiesheng.login.pojos.DoLoginInfo;
import com.tiesheng.login.service.TieshengLoginConfigurer; import com.tiesheng.login.service.TieshengLoginConfigurer;
import com.tiesheng.util.config.GlobalConfig;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
@@ -23,6 +25,8 @@ public class CorePlatformUniqueService extends TsServiceBase<CorePlatformUniqueM
TieshengWebConfigurer tieshengWebConfigurer; TieshengWebConfigurer tieshengWebConfigurer;
@Autowired @Autowired
CoreLogService coreLogService; CoreLogService coreLogService;
@Autowired
GlobalConfig globalConfig;
@Override @Override
public TokenBean doLogin(DoLoginInfo loginInfo) { public TokenBean doLogin(DoLoginInfo loginInfo) {
@@ -36,7 +40,13 @@ public class CorePlatformUniqueService extends TsServiceBase<CorePlatformUniqueM
} }
platformUnique.setInfo(loginInfo.getInfo()); platformUnique.setInfo(loginInfo.getInfo());
TokenBean tokenBean = tieshengWebConfigurer.loginConfigurer().doLogin(platformUnique, loginInfo.getTo()); TokenBean tokenBean = null;
if (StrUtil.isEmpty(platformUnique.getUserId())) {
tokenBean = tieshengWebConfigurer.loginConfigurer().doLogin(platformUnique, loginInfo.getTo());
} else {
tokenBean = new TokenBean(platformUnique.getUserId(), loginInfo.getTo(), globalConfig.getService());
}
if (tokenBean != null) { if (tokenBean != null) {
platformUnique.setUserId(tokenBean.getId()); platformUnique.setUserId(tokenBean.getId());
platformUnique.setIsDeleted(0); platformUnique.setIsDeleted(0);