Commit a6c14c68076e4c73bb1ab15ff40aa939ecf8f7cd

Authored by rui.zhang
1 parent 8092569183

platform permission

用户登录

Showing 1 changed file with 5 additions and 0 deletions

platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/UsersController.java View file @ a6c14c6
... ... @@ -22,6 +22,7 @@
22 22 import javax.management.relation.Role;
23 23 import javax.servlet.http.HttpServletRequest;
24 24 import javax.servlet.http.HttpServletResponse;
  25 +import javax.validation.constraints.Pattern;
25 26 import java.util.*;
26 27  
27 28 /**
... ... @@ -215,6 +216,10 @@
215 216  
216 217 if (StringUtils.isEmpty(phone)) {
217 218 ResultUtils.buildParameterErrorResultAndWrite(httpServletResponse);
  219 + return;
  220 + }
  221 + if(!phone.matches("^(((13[0-9]{1})|(15[0-9]{1})|(17[0-9]{1})|(18[0-9]{1}))+d{8})$")) {
  222 + ResultUtils.buildParameterErrorResultAndWrite(httpServletResponse, "手机号不正确!");
218 223 return;
219 224 }
220 225