|
|
@ -49,6 +49,7 @@ import javax.servlet.http.HttpServletRequest; |
|
|
|
import javax.validation.Valid; |
|
|
|
import java.text.SimpleDateFormat; |
|
|
|
import java.util.*; |
|
|
|
import java.util.regex.Pattern; |
|
|
|
|
|
|
|
/** |
|
|
|
* Project: anrui_portal(门户建设) <br/> |
|
|
@ -723,13 +724,21 @@ public class SysUserRest { |
|
|
|
@ApiOperation(value = "3、获取注册码") |
|
|
|
@ApiOperationSupport(order = 30) |
|
|
|
public ResultBean sendMessageCode(@RequestParam("mobile") String mobile) { |
|
|
|
if (StringUtils.isBlank(mobile) || !RegexUtil.isMobile(mobile)) { |
|
|
|
boolean a=Pattern.matches("^((13[0-9])|(14[5,7])|(15[0-3,5-9])|(17[0,3,5-8])|(18[0-9])|(19[0-9])|166|198|199|(147))\\d{8}$", mobile); |
|
|
|
if (StringUtils.isBlank(mobile) || !a) { |
|
|
|
return new ResultBean().fail().setMsg("请输入正确的手机号"); |
|
|
|
} |
|
|
|
String verificationCode = ""; |
|
|
|
return sysUserService.getVerificationCode(mobile, verificationCode); |
|
|
|
} |
|
|
|
|
|
|
|
public static void main(String[] args) { |
|
|
|
String mobile="19622113992"; |
|
|
|
boolean b=RegexUtil.isMobile(mobile); |
|
|
|
System.out.println(b); |
|
|
|
boolean b1=Pattern.matches("^((13[0-9])|(14[5,7])|(15[0-3,5-9])|(17[0,3,5-8])|(18[0-9])|(19[0-9])|166|198|199|(147))\\d{8}$", mobile); |
|
|
|
System.out.println(b1); |
|
|
|
} |
|
|
|
/** |
|
|
|
* 获取登录码() |
|
|
|
* @param mobile |
|
|
|