Commit 47206bec by huluobin

美甲师登陆流程修改 线程变量保存登陆Seesion

parent 370d9127
...@@ -102,26 +102,17 @@ public class PhoneLoginController { ...@@ -102,26 +102,17 @@ public class PhoneLoginController {
@ResponseBody @ResponseBody
@ApiOperation(value = "获取验证码,用于绑定手机号码") @ApiOperation(value = "获取验证码,用于绑定手机号码")
@RequestMapping(method = {RequestMethod.POST}, value = "/technician/getBindCode") @PostMapping("/technician/getBindCode")
public JsonResult<String> techGetBindCode(@RequestParam String phone, String token) { public JsonResult<String> techGetBindCode(@RequestParam String phone) {
if (token == null || token.isEmpty()) {
return new JsonResult<>(false, "入参token为空", null);
}
if (!CheckUtil.isPhone(phone)) { if (!CheckUtil.isPhone(phone)) {
log.info("用户号码格式不正确"); log.info("用户号码格式不正确");
return new JsonResult<>(false, "用户号码格式不正确", null); throw new RRException("用户号码格式不正确");
}
GogirlToken gt = gogirlTokenService.getByToken(token);
if (gt == null) {
return new JsonResult<>(false, "TOKEN_NULL_CODE", "token过期");
} }
String code = getNewCode(); String code = getNewCode();
SmsSingleSenderResult result = smsService.sendBindSmsCode(phone, code); SmsSingleSenderResult result = smsService.sendBindSmsCode(phone, code);
if (result != null) { if (result != null) {
//验证码保存到TOKEN //todo 验证码逻辑
gt.setCode(code);
gt.setPhone(phone);
gogirlTokenService.updateById(gt);
return new JsonResult<>(true, JsonResult.APP_DEFINE_SUC, null); return new JsonResult<>(true, JsonResult.APP_DEFINE_SUC, null);
} else { } else {
return new JsonResult<>(false, "发送验证码失败,请重试", null); return new JsonResult<>(false, "发送验证码失败,请重试", null);
......
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