From 11cdd80252d41f57f72722adb2814ab3a2660e3b Mon Sep 17 00:00:00 2001
From: zhongrj <646384940@qq.com>
Date: Thu, 04 Jan 2024 10:28:11 +0800
Subject: [PATCH] 考试中获取题目失败重新生成
---
src/main/java/org/springblade/modules/system/service/impl/UserServiceImpl.java | 15 +++++++--------
1 files changed, 7 insertions(+), 8 deletions(-)
diff --git a/src/main/java/org/springblade/modules/system/service/impl/UserServiceImpl.java b/src/main/java/org/springblade/modules/system/service/impl/UserServiceImpl.java
index 7cc27b4..6a2857d 100644
--- a/src/main/java/org/springblade/modules/system/service/impl/UserServiceImpl.java
+++ b/src/main/java/org/springblade/modules/system/service/impl/UserServiceImpl.java
@@ -1900,11 +1900,11 @@
@Override
public Boolean wxRegister(User user) {
User params = new User();
- params.setPhone(user.getPhone());
- //查看数据库是否有相同手机号
+ params.setCardid(user.getCardid());
+ //查看数据库是否有相同身份证号
List<User> list = list(Condition.getQueryWrapper(params));
if (list.size()>0){
- throw new ServiceException("该用户已注册");
+ throw new ServiceException("该身份证号已注册");
}
//注册新用户
@@ -1966,13 +1966,12 @@
}
}
- //根据身份证获取用户
- User userInfoByIdCardNo = baseMapper.getUserInfoByIdCardNo(userExcel.getCardid());
+ //根据身份证、保安证编号获取用户
+ User userInfoByIdCardNo = baseMapper.getUserInfoByIdCardNoAndSecurityNumber(userExcel.getCardid(),userExcel.getSecuritynumber());
- if (!userInfoByIdCardNo.getSecuritynumber().equals( userExcel.getSecuritynumber())){
- throw new ServiceException("导入失败!保安证编号与系统不匹配!");
+ if (userInfoByIdCardNo == null){
+ throw new ServiceException("导入失败!身份证号和保安证编号与系统不匹配!");
}
-
User user = new User();
user.setId(userInfoByIdCardNo.getId());
--
Gitblit v1.9.3