Commit 61e2bce8 authored by 李健华's avatar 李健华

Merge branch 'hotfix/modify_phone-20220722' into 'master'

修改手机号同时判断手机号是否存在用户详情表内

See merge request !84
parents 32a8b259 9b055528
......@@ -324,7 +324,8 @@ public class UserServiceImpl implements IUserService, IBaseController {
public User modifyPhoneNo(String oldPhoneNo, String newPhoneNo) {
//1. 判断新手机号是否存在
User newPhoneUser = userRepository.findByPhoneNo(newPhoneNo);
if (Objects.nonNull(newPhoneUser)) {
UserDetail newPhoneUserDetail = userDetailService.findByPhoneNo(newPhoneNo);
if (Objects.nonNull(newPhoneUser) || Objects.nonNull(newPhoneUserDetail)) {
//新手机号已存在
throw new DataException("新手机号存在, 用户修改手机号后新手机号注册了。");
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment