Commit d10343f5 authored by yaobaizheng's avatar yaobaizheng

注册线索模块 异步接口处理

parent 7970f0e4
......@@ -116,6 +116,9 @@ public class Constants {
public static final String TOKEN_HEADER = "Authorization";
//短信过期时间
public static final int EXPIRE_TIME =5;
//秒
public static final int INTERVAL_TIME =4*60;
......
package com.lyy.user.moudle.login.controller;
import com.lyy.user.constant.Constants;
import com.lyy.user.enums.SendMsgTypeEnum;
import com.lyy.user.moudle.user.service.SysUserInfoService;
import com.lyy.user.moudle.user.vo.*;
import com.lyy.user.util.redis.RedisUtil;
import io.swagger.annotations.*;
import lombok.RequiredArgsConstructor;
import org.springframework.validation.annotation.Validated;
......@@ -94,4 +96,5 @@ public class SysPcLoginController {
public boolean forget(@RequestBody @Validated ForgetVo forgetVo) {
return this.sysUserInfoService.forget(forgetVo, SendMsgTypeEnum.FORGOT_PASSWORD.getCode());
}
}
......@@ -281,6 +281,7 @@ public class SysUserInfoServiceImpl extends ServiceImpl<SysUserInfoMapper, SysUs
Map<String, Object> saveThread = new HashMap<>();
saveThread.put("dataSource", 1);
saveThread.put("phone", phone);
saveThread.put("createTime", DateUtil.date());
CompletableFuture.runAsync(() -> businessService.savThread(saveThread));
......
......@@ -23,13 +23,13 @@ import javax.validation.constraints.Size;
public class ForgetVo {
@NotEmpty(message = "密码不能为空")
@Size(min = 6,max = 12,message = "密码长度需要在6到12之间")
@Pattern(regexp = "^[a-zA-Z0-9_]{6,12}$", message = "密码只能包含字母和数字")
@Size(min = 6,max = 20,message = "密码长度需要在6到20之间")
@Pattern(regexp = "^[a-zA-Z0-9~!@#$%^&*()_+?]{6,20}$", message = "密码长度必须大于等于6位,小于等于20")
@ApiModelProperty(value = "密码",required = true)
private String password;
@NotEmpty(message = "手机号不能为空")
@Pattern(regexp = "^1[3456789]\\d{9}$", message = "手机号格式不正确")
@Pattern(regexp = "^1[3-9]\\d{9}$", message = "手机号格式不正确")
@ApiModelProperty(value = "手机号",required = true)
private String phone;
......
......@@ -34,8 +34,9 @@ public class LoginVo {
private String phone;
@NotEmpty(message = "密码不能为空")
@Size(min = 6,max = 12,message = "密码长度需要在6到12之间")
@Pattern(regexp = "^[a-zA-Z0-9_]{6,12}$", message = "密码只能包含字母和数字")
@Size(min = 6,max = 20,message = "密码长度需要在6到20之间")
@Pattern(regexp = "^[a-zA-Z0-9~!@#$%^&*()_+?]{6,20}$", message = "密码长度必须大于等于6位,小于等于20")
// @Pattern(regexp = "^(?=.*[a-zA-Z])(?=.*\\\\d)(?=.*[@$!%*#?&])[A-Za-z\\\\d@$!%*#?&]{6,20}$", message = "密码长度必须大于等于6位,小于等于20")
@ApiModelProperty(value = "密码",required = true)
private String password;
}
......@@ -30,7 +30,7 @@ public class BusinessService {
this.webClient
.post()
.uri(url)
.bodyValue(BodyInserters.fromValue(params))
.bodyValue(params)
.retrieve()
.bodyToMono(AjaxResult.class)
.block();
......
......@@ -43,5 +43,5 @@ knife4j:
business:
url:
thread: localhost:8087/api/threadInfo/v1.0/save
thread: localhost:8087/lyy/api/threadInfo/v1.0/save
......@@ -37,4 +37,4 @@ knife4j:
business:
url:
thread: localhost:8087/api/threadInfo/v1.0/save
thread: localhost:8087/lyy/api/threadInfo/v1.0/save
......@@ -36,4 +36,4 @@ knife4j:
business:
url:
thread: localhost:8087/api/threadInfo/v1.0/save
thread: localhost:8087/lyy/api/threadInfo/v1.0/save
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