|
@@ -109,12 +109,12 @@ public class AppletController extends BaseController {
|
|
|
*/
|
|
|
@SaIgnore
|
|
|
@RepeatSubmit(interval = 1,timeUnit = TimeUnit.MINUTES)
|
|
|
- @GetMapping("/appForgetPW/{photo}")
|
|
|
- public AjaxResult appForgetPW(@PathVariable String photo)
|
|
|
+ @GetMapping("/appForgetPW/{phone}")
|
|
|
+ public AjaxResult appForgetPW(@PathVariable String phone)
|
|
|
{
|
|
|
String code = SendSmsUtils.getCode(4);
|
|
|
- SendSmsUtils.sendSms(photo,"SMS_232893584","{\"code\":\"" + code + "\"}");
|
|
|
- String key = "SMS_CODE:"+photo;
|
|
|
+ SendSmsUtils.sendSms(phone,"SMS_219525380","{\"code\":\"" + code + "\"}");
|
|
|
+ String key = "SMS_CODE:"+phone;
|
|
|
RedisUtils.setCacheObject(key,code, Duration.ofMinutes(5));
|
|
|
return AjaxResult.success(code);
|
|
|
}
|
|
@@ -124,14 +124,14 @@ public class AppletController extends BaseController {
|
|
|
@SaIgnore
|
|
|
@RepeatSubmit
|
|
|
@GetMapping("/appCheck")
|
|
|
- public R<Void> appCheck(@RequestParam("code") String code,@RequestParam("photo") String photo,@RequestParam("password") String password)
|
|
|
+ public R<Void> appCheck(@RequestParam("code") String code,@RequestParam("phone") String phone,@RequestParam("password") String password)
|
|
|
{
|
|
|
- String key = "SMS_CODE:"+photo;
|
|
|
+ String key = "SMS_CODE:"+phone;
|
|
|
Object cacheObject = RedisUtils.getCacheObject(key);
|
|
|
if (ObjectUtils.isNotEmpty(cacheObject)){
|
|
|
if (code.equals(String.valueOf(cacheObject))){
|
|
|
//修改密码
|
|
|
- return toAjax(sysUserService.resetUserPwdByUserName(photo,BCrypt.hashpw(password)));
|
|
|
+ return toAjax(sysUserService.resetUserPwdByUserName(phone,BCrypt.hashpw(password)));
|
|
|
}
|
|
|
}
|
|
|
return R.fail();
|