token fix

This commit is contained in:
sxu 2025-02-11 16:02:47 +08:00
parent 1c30938d6f
commit 2190167436
1 changed files with 1 additions and 2 deletions

View File

@ -137,13 +137,12 @@ public class TokenController {
custInfo.setIdCard(SM4EncryptUtils.sm4Encryptbyconfig(content.getIdCard())); custInfo.setIdCard(SM4EncryptUtils.sm4Encryptbyconfig(content.getIdCard()));
} }
CustInfoAppIdLoginVO result = this.custInfoMapper.selectLoginInfo(custInfo); CustInfoAppIdLoginVO result = this.custInfoMapper.selectLoginInfo(custInfo);
result.setCustIdStr(result.getCustId().toString());
if (Objects.isNull(result)) { if (Objects.isNull(result)) {
throw new ServiceException("未找到用户"); throw new ServiceException("未找到用户");
} else { } else {
result.setCustIdStr(result.getCustId().toString());
if (CustLoginTypeEnum.getNeedPasswordLoginTypeToMap().containsKey(content.getLoginType())) { if (CustLoginTypeEnum.getNeedPasswordLoginTypeToMap().containsKey(content.getLoginType())) {
content.setPassword(AesEncryptUtil.aesDecode(content.getPassword())); content.setPassword(AesEncryptUtil.aesDecode(content.getPassword()));
log.info("输入密码:{}", content.getPassword());
if (!encoder.matches(content.getPassword(), result.getPwd())) { if (!encoder.matches(content.getPassword(), result.getPwd())) {
throw new ServiceException("密码错误"); throw new ServiceException("密码错误");
} }