Commit 18a71ffe authored by 赵浩琳's avatar 赵浩琳

金融调修改手机号接口用原手机号查询用户

parent b65af786
...@@ -12,7 +12,7 @@ import java.io.Serializable; ...@@ -12,7 +12,7 @@ import java.io.Serializable;
@Data @Data
public class ModifyPhoneRecord implements Serializable { public class ModifyPhoneRecord implements Serializable {
@NotNull(message = "用户ID不能为空") // @NotNull(message = "用户ID不能为空")
private Long userId; private Long userId;
@NotBlank(message = "原手机号不能为空") @NotBlank(message = "原手机号不能为空")
......
...@@ -49,6 +49,7 @@ import javax.persistence.criteria.Predicate; ...@@ -49,6 +49,7 @@ import javax.persistence.criteria.Predicate;
import javax.persistence.criteria.Root; import javax.persistence.criteria.Root;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Objects;
/** /**
* Date: 2019/11/4 * Date: 2019/11/4
...@@ -253,6 +254,9 @@ public class ModifyPhoneNoServiceImpl implements IModifyPhoneNoService { ...@@ -253,6 +254,9 @@ public class ModifyPhoneNoServiceImpl implements IModifyPhoneNoService {
if (modifyPhoneRecord.getCurPhoneNo().equals(modifyPhoneRecord.getPrevPhoneNo())) { if (modifyPhoneRecord.getCurPhoneNo().equals(modifyPhoneRecord.getPrevPhoneNo())) {
throw new DataException("新手机号已存在,不支持更换"); throw new DataException("新手机号已存在,不支持更换");
} }
if (Objects.isNull(modifyPhoneRecord.getUserId())){
throw new DataException("用户ID不能为空");
}
User user = userService.findById(modifyPhoneRecord.getUserId()); User user = userService.findById(modifyPhoneRecord.getUserId());
if (user == null) { if (user == null) {
throw new DataException("用户不存在"); 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