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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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