userInfo获取修改

This commit is contained in:
张松 2025-01-07 19:11:12 +08:00
parent 938b26449f
commit da9b74b89b
2 changed files with 4 additions and 3 deletions

View File

@ -3,6 +3,7 @@ package com.sqx.modules.app.interceptor;
import cn.hutool.core.thread.ThreadUtil;
import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.sqx.common.exception.CzgException;
@ -111,7 +112,7 @@ public class AuthorizationInterceptor extends HandlerInterceptorAdapter {
throw new CzgException("异常行为用户: {}" + user.getUserId());
}
// 实名认证信息
UserInfo userInfo = userInfoService.getByUserId(user.getUserId());
UserInfo userInfo = userInfoService.getOne(new LambdaQueryWrapper<UserInfo>().eq(UserInfo::getUserId, user.getUserId()));
if (userInfo != null && StrUtil.isNotBlank(userInfo.getCertNo())) {
TbUserBlacklist blacklist = tbUserBlacklistMapper.selectOne(Wrappers.<TbUserBlacklist>lambdaQuery().eq(TbUserBlacklist::getIdCardNo, userInfo.getCertNo()));
if (blacklist != null) {

View File

@ -528,8 +528,8 @@ public class CashOutServiceImpl extends ServiceImpl<CashOutDao, CashOut> impleme
return Result.error(9999, "请先绑定支付宝账号!");
}
UserInfo userDetailInfo = userInfoService.getByUserId(userId);
if (StrUtil.isBlank(userDetailInfo.getCertName())) {
UserInfo userDetailInfo = userInfoService.getOne(new LambdaQueryWrapper<UserInfo>().eq(UserInfo::getUserId, userId));
if (userDetailInfo == null || StrUtil.isBlank(userDetailInfo.getCertName())) {
return Result.error(9991, "请先实名认证!");
}