feat: 登录部分
This commit is contained in:
@@ -29,6 +29,7 @@ import org.nutz.dao.Sqls;
|
||||
import org.nutz.dao.sql.Sql;
|
||||
import org.nutz.integration.jedis.RedisService;
|
||||
import org.nutz.ioc.aop.Aop;
|
||||
import org.nutz.ioc.impl.PropertiesProxy;
|
||||
import org.nutz.ioc.loader.annotation.Inject;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
import org.nutz.lang.Lang;
|
||||
@@ -63,6 +64,8 @@ public class SysUserServiceImpl extends BaseServiceImpl<Sys_user> implements Sys
|
||||
private SLogService sLogService;
|
||||
@Inject
|
||||
private RedisService redisService;
|
||||
@Inject
|
||||
private PropertiesProxy conf;
|
||||
|
||||
@Override
|
||||
@CacheResult(cacheKey = "${userId}_getPermissionList")
|
||||
@@ -356,7 +359,7 @@ public class SysUserServiceImpl extends BaseServiceImpl<Sys_user> implements Sys
|
||||
String decodePwd = Base64Decoder.decodeStr(passowrd);
|
||||
String hashedPassword = PwdUtil.getPassword(decodePwd, user.getSalt());
|
||||
if (!Strings.sNull(hashedPassword).equalsIgnoreCase(user.getPassword())) {
|
||||
if (Globals.sso) {
|
||||
if (Globals.sso || !"dev".equalsIgnoreCase(conf.get("nutz.profiles.active"))) {
|
||||
throw new BaseException("用户名或者密码不正确");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
framework:
|
||||
server:
|
||||
port: 8080
|
||||
port: 8088
|
||||
host: 0.0.0.0
|
||||
nutz:
|
||||
application:
|
||||
@@ -11,10 +11,10 @@
|
||||
redis:
|
||||
host: 127.0.0.1
|
||||
port: 6379
|
||||
database: 0
|
||||
database: 4
|
||||
mode: normal
|
||||
jdbc:
|
||||
url: jdbc:mysql://127.0.0.1:3306/zhgh_zjnu?useUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true
|
||||
url: jdbc:mysql://127.0.0.1:3306/zhgh_zjnu_v4?useUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true
|
||||
username: root
|
||||
password: dd3s@#2022
|
||||
beetl:
|
||||
|
||||
Reference in New Issue
Block a user