修改用户,身份证判重
parent
5c7255b0d5
commit
497098a55f
|
|
@ -87,6 +87,10 @@ public class UserUpdateExe {
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
if(!Objects.equals(userE.getUserIdCard(), userDO.getUserIdCard())){
|
||||||
|
//判断
|
||||||
|
userRepository.checkUserIdCard(userUpdateCmd.getId(),userUpdateCmd.getUserIdCard());
|
||||||
|
}
|
||||||
|
|
||||||
CorpInfoDO corpInfoDO = corpInfoRepository.getById(userDO.getCorpinfoId());
|
CorpInfoDO corpInfoDO = corpInfoRepository.getById(userDO.getCorpinfoId());
|
||||||
if(corpInfoDO != null){
|
if(corpInfoDO != null){
|
||||||
|
|
|
||||||
|
|
@ -81,7 +81,7 @@ public interface UserRepository extends BaseRepository<UserDO> {
|
||||||
|
|
||||||
UserDO getByPhoneAndIdCard(String phone, String idCardNumber);
|
UserDO getByPhoneAndIdCard(String phone, String idCardNumber);
|
||||||
|
|
||||||
void checkUserIdCard(@NotNull(message = "手机号不能为空") String phone, String userIdCard);
|
void checkUserIdCard( Long id, String userIdCard);
|
||||||
|
|
||||||
List<UserDO> getListByPhone(String phone,List<Integer> employmentFlagList);
|
List<UserDO> getListByPhone(String phone,List<Integer> employmentFlagList);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -535,10 +535,10 @@ public class UserRepositoryImpl extends BaseRepositoryImpl<UserMapper, UserDO> i
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void checkUserIdCard(String phone, String userIdCard) {
|
public void checkUserIdCard(Long id, String userIdCard) {
|
||||||
Map<String, Object> verifyParam = new HashMap<>();
|
Map<String, Object> verifyParam = new HashMap<>();
|
||||||
verifyParam.put("userIdCard", userIdCard);
|
verifyParam.put("userIdCard", userIdCard);
|
||||||
verifyParam.put("phone", phone);
|
verifyParam.put("id", id);
|
||||||
Integer count = userMapper.countUser(verifyParam);
|
Integer count = userMapper.countUser(verifyParam);
|
||||||
if (count > 0) {
|
if (count > 0) {
|
||||||
throw new BizException("身份证号已经存在,请联系管理员");
|
throw new BizException("身份证号已经存在,请联系管理员");
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue