删除无用代码
This commit is contained in:
parent
657017d26d
commit
559dcafe80
@ -312,7 +312,7 @@ public class SysUserController {
|
||||
* 发送验证码
|
||||
*/
|
||||
@GetMapping("/verificationCode")
|
||||
public String verificationCode(@RequestParam("phone") String phone, @RequestParam(value = "agentOrgId", required = false) String agentOrgId) throws Exception {
|
||||
public String verificationCode(@RequestParam("phone") String phone) throws Exception {
|
||||
String optCode = String.valueOf(RandomUtil.returnCode());
|
||||
redisService.set(phone, optCode, 10, TimeUnit.MINUTES);
|
||||
SendSmsResponse response = AliYunSmsUtils.sendCode(phone, optCode);
|
||||
@ -324,7 +324,6 @@ public class SysUserController {
|
||||
*/
|
||||
@GetMapping("/verificationCodeUpdate")
|
||||
public String verificationCodeUpdate(@RequestParam("phone") String phone) throws Exception {
|
||||
|
||||
Specification<SysUserEntity> specification = (root, criteriaQuery, criteriaBuilder) -> {
|
||||
//查询条件集合
|
||||
List<Predicate> predicateList = new ArrayList<>();
|
||||
@ -336,7 +335,6 @@ public class SysUserController {
|
||||
if (sysUserEntityList.size() == 0) {
|
||||
return outputEncapsulationObject(PromptMessageEnum.DATA_NONE, "手机号错误,请使用您注册的手机号", locale);
|
||||
}
|
||||
SysUserEntity sysUserEntity = sysUserEntityList.get(0);
|
||||
String optCode = String.valueOf(RandomUtil.returnCode());
|
||||
redisService.set(phone, optCode, 10, TimeUnit.MINUTES);
|
||||
SendSmsResponse response = AliYunSmsUtils.sendCode(phone, optCode);
|
||||
@ -348,11 +346,11 @@ public class SysUserController {
|
||||
*/
|
||||
@GetMapping("/getVerificationCode")
|
||||
public String getVerificationCode(@RequestParam("phone") String phone, @RequestParam("verificationCode") String verificationCode) {
|
||||
String o = (String) redisService.get(phone);
|
||||
if ("".equals(o) || o == null) {
|
||||
String code = (String) redisService.get(phone);
|
||||
if (TextUtils.isEmpty(code)) {
|
||||
return outputEncapsulationObject(PromptMessageEnum.DATA_WRONG, "请先发送验证码!", locale);
|
||||
}
|
||||
if (!redisService.get(phone).equals(verificationCode)) {
|
||||
if (!code.equals(verificationCode)) {
|
||||
return outputEncapsulationObject(PromptMessageEnum.DATA_WRONG, "验证码错误,请重新输入!", locale);
|
||||
}
|
||||
return outputEncapsulationObject(PromptMessageEnum.SUCCESS, "true", locale);
|
||||
|
@ -53,11 +53,6 @@ public class SysUserQo {
|
||||
|
||||
private String accountType;
|
||||
|
||||
/**
|
||||
* 代理组织ID
|
||||
*/
|
||||
private Long agentOrgId;
|
||||
|
||||
public SysUserQo() {
|
||||
}
|
||||
|
||||
@ -165,11 +160,4 @@ public class SysUserQo {
|
||||
this.accountType = accountType;
|
||||
}
|
||||
|
||||
public Long getAgentOrgId() {
|
||||
return agentOrgId;
|
||||
}
|
||||
|
||||
public void setAgentOrgId(Long agentOrgId) {
|
||||
this.agentOrgId = agentOrgId;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user