diff --git a/src/main/java/com/sqx/modules/app/service/UserService.java b/src/main/java/com/sqx/modules/app/service/UserService.java index 0998a9ea..f13b3a7a 100644 --- a/src/main/java/com/sqx/modules/app/service/UserService.java +++ b/src/main/java/com/sqx/modules/app/service/UserService.java @@ -228,17 +228,6 @@ public interface UserService extends IService { void firstBindAwardsMoney(UserEntity entity); - /** - * 二要素身份证认证 - */ - Object authCertNo(long userId, AuthCertNoDTO authCertNoDTO); - - - /** - * 四要素身份证认证 - */ - Object auth(long userId, AuthDTO authDTO); - /** * 封禁拉黑用户 * 用户行为 diff --git a/src/main/java/com/sqx/modules/app/service/impl/UserServiceImpl.java b/src/main/java/com/sqx/modules/app/service/impl/UserServiceImpl.java index c4267791..90f44882 100644 --- a/src/main/java/com/sqx/modules/app/service/impl/UserServiceImpl.java +++ b/src/main/java/com/sqx/modules/app/service/impl/UserServiceImpl.java @@ -1657,71 +1657,6 @@ public class UserServiceImpl extends ServiceImpl implements } - @Override - public Object authCertNo(long userId, AuthCertNoDTO authCertNoDTO) { - authCertNoDTO.setName(StrUtil.trim(authCertNoDTO.getName())); - authCertNoDTO.setIdNum(StrUtil.trim(authCertNoDTO.getIdNum())); - if (!IdcardUtil.isValidCard(authCertNoDTO.getIdNum())) { - throw new SqxException("身份证号码有误"); - } - - UserEntity userEntity = baseMapper.selectById(userId); - if (userEntity == null) { - throw new SqxException("用户信息不存在"); - } - - UserInfo userInfo = userInfoService.getByUserIdOrSave(userId); - if (userInfo.getCertName() != null) { - throw new SqxException("此账号已认证"); - } - - Integer count = userInfoService.countCertCount(authCertNoDTO.getName(), authCertNoDTO.getIdNum()); - if (count > 1) { - throw new SqxException("此实名信息已存在"); - } - - aliService.authCertNo(authCertNoDTO.getName(), authCertNoDTO.getIdNum()); - - userInfo.setCertName(authCertNoDTO.getName()); - userInfo.setCertNo(authCertNoDTO.getIdNum()); - userInfo.setUpdateTime(DateUtil.date()); - return userInfoService.updateById(userInfo); - } - - @Override - public Object auth(long userId, AuthDTO authDTO) { - authDTO.setName(StrUtil.trim(authDTO.getName())); - authDTO.setIdNum(StrUtil.trim(authDTO.getIdNum())); - authDTO.setAccountNo(StrUtil.trim(authDTO.getAccountNo())); - authDTO.setMobile(StrUtil.trim(authDTO.getMobile())); - - UserEntity userEntity = baseMapper.selectById(userId); - if (userEntity == null) { - throw new SqxException("用户信息不存在"); - } - - UserInfo userInfo = userInfoService.getByUserIdOrSave(userId); - if (StrUtil.isNotEmpty(userInfo.getCertName()) && StrUtil.isNotEmpty(userInfo.getAccountNo()) && StrUtil.isNotEmpty(userInfo.getMobile())) { - throw new SqxException("此账号已认证"); - } - - Integer count = userInfoService.countCertCount(authDTO.getName(), authDTO.getIdNum(), authDTO.getAccountNo(), authDTO.getMobile()); - if (count > 1) { - throw new SqxException("此实名信息已存在"); - } - - AuthRespDTO resp = aliService.auth(authDTO.getName(), authDTO.getIdNum(), authDTO.getAccountNo(), authDTO.getMobile()); - - userInfo.setCertName(authDTO.getName()); - userInfo.setCertNo(authDTO.getIdNum()); - userInfo.setAccountNo(authDTO.getAccountNo()); - userInfo.setMobile(authDTO.getMobile()); - userInfo.setBankName(resp.getBankName()); - userInfo.setRespJson(resp.getRespJson()); - userInfo.setUpdateTime(DateUtil.date()); - return userInfoService.updateById(userInfo); - } - @Override public void addBlackUser(Long userId,String behavior) { log.info("异常用户id, 异常操作: {},{}", userId,behavior);