升级某些依赖,移除某些依赖,修改用户查询sql
This commit is contained in:
@@ -20,11 +20,6 @@
|
||||
<artifactId>diyfile-doc</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
<!-- mybatis-spring-boot-starter -->
|
||||
<dependency>
|
||||
<groupId>org.mybatis.spring.boot</groupId>
|
||||
<artifactId>mybatis-spring-boot-starter</artifactId>
|
||||
</dependency>
|
||||
<!-- mybatis-plus -->
|
||||
<dependency>
|
||||
<groupId>com.baomidou</groupId>
|
||||
|
||||
@@ -48,6 +48,8 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements Us
|
||||
public SaTokenInfo login(String username, String password) {
|
||||
User user = this.baseMapper.selectByUsername(username);
|
||||
Assert.notNull(user, "账号或密码错误!");
|
||||
if (Objects.equals(user.getStatus(), SystemConstants.STATUS_NO))
|
||||
throw new DiyFileException(String.format("账号:%s 已被禁用,请联系管理员!", username));
|
||||
log.info("用户发起登录请求:{}", username);
|
||||
if (!Objects.equals(SecureUtil.sha256(password), user.getPassword()))
|
||||
throw new DiyFileException("账号或密码错误!");
|
||||
|
||||
@@ -44,8 +44,6 @@
|
||||
FROM
|
||||
user
|
||||
WHERE
|
||||
status = 1
|
||||
AND
|
||||
del = 1
|
||||
AND
|
||||
username = #{username}
|
||||
|
||||
11
pom.xml
11
pom.xml
@@ -31,12 +31,11 @@
|
||||
<mybatis-plus.version>3.5.3.1</mybatis-plus.version>
|
||||
<springdoc.version>2.0.2</springdoc.version>
|
||||
<sa-token.version>1.34.0</sa-token.version>
|
||||
<hutool-all.version>5.8.11</hutool-all.version>
|
||||
<mybatis.version>3.0.1</mybatis.version>
|
||||
<hutool-all.version>5.8.12</hutool-all.version>
|
||||
<pagehelper.version>1.4.6</pagehelper.version>
|
||||
<oshi.version>6.4.0</oshi.version>
|
||||
<okhttps.version>3.5.3</okhttps.version>
|
||||
<caffeine.version>3.1.2</caffeine.version>
|
||||
<caffeine.version>3.1.4</caffeine.version>
|
||||
<aliyun-sdk-oss.version>3.16.0</aliyun-sdk-oss.version>
|
||||
<jaxb-api.version>2.3.1</jaxb-api.version>
|
||||
<activation.version>1.1.1</activation.version>
|
||||
@@ -102,12 +101,6 @@
|
||||
<artifactId>mysql-connector-java</artifactId>
|
||||
<version>${mysql.version}</version>
|
||||
</dependency>
|
||||
<!-- mybatis-spring-boot-starter -->
|
||||
<dependency>
|
||||
<groupId>org.mybatis.spring.boot</groupId>
|
||||
<artifactId>mybatis-spring-boot-starter</artifactId>
|
||||
<version>${mybatis.version}</version>
|
||||
</dependency>
|
||||
<!-- mybatis-plus -->
|
||||
<dependency>
|
||||
<groupId>com.baomidou</groupId>
|
||||
|
||||
Reference in New Issue
Block a user