Commit 2b0d6526 by 黄森林

密码修改

parent a3d2dfb2
......@@ -130,4 +130,6 @@ public class SysUser implements Serializable {
*/
@TableField(value = "deptidBelong")
private String deptidBelong;
private String oldPassward;
}
......@@ -31,6 +31,7 @@ public class LoginApplicaionConfig extends WebMvcConfigurationSupport {
// login changePwd路径进行拦截
registry.addInterceptor(loginInterceptor).addPathPatterns("/login");
registry.addInterceptor(changePwdInterceptor).addPathPatterns("/mgr/changePwd");
registry.addInterceptor(changePwdInterceptor).addPathPatterns("/mgr/changeOtherPwd");
super.addInterceptors(registry);
}
......
......@@ -108,10 +108,18 @@ public class GetPhoneCodeController extends BaseController {
return sent;
}
/**
* 修改用户密码发送验证码
* @return
*/
@RequestMapping("/mgr/codemessage")
public Object codemessage() {
Integer userId = ShiroKit.getUser().getId();
User user = userService.selectById(userId);
Long expire = stringRedisTemplate.getExpire(userId.toString());
if (expire>(60*4)){
return ResponseEntity.newJSON("code", 400, "message", "请勿频繁发送手机验证码操作!");
}
String verificationCode = String.valueOf((int) ((Math.random() * 9 + 1) * 100000));
//5分钟内有效
stringRedisTemplate.opsForValue().set(userId.toString(), verificationCode, 1000 * 60*5, TimeUnit.MILLISECONDS);
......
......@@ -21,12 +21,12 @@
<module>order</module>
</modules>
<packaging>pom</packaging>
<description>外呼集约系统聚合</description>
<description>校园系统聚合</description>
<parent>
<groupId>com.winsun.framework</groupId>
<artifactId>winsun-parent</artifactId>
<version>0.1.57</version>
<version>0.1.58</version>
</parent>
<properties>
......
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