...
|
...
|
@@ -7,6 +7,7 @@ import com.ui.contants.HttpUriContants; |
|
|
import com.ui.http.HttpRestClient;
|
|
|
import com.ui.model.BaseResponse;
|
|
|
import com.ui.model.req.User;
|
|
|
import org.apache.commons.lang.RandomStringUtils;
|
|
|
import org.slf4j.Logger;
|
|
|
import org.slf4j.LoggerFactory;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
...
|
...
|
@@ -75,7 +76,7 @@ public class UserCtrl { |
|
|
model.addAttribute("message", "当前用户不存在");
|
|
|
return new ModelAndView("user/modifypwd");
|
|
|
}
|
|
|
user.setPwd(MD5Util.encryption(newpwd));
|
|
|
user.setPwd(RandomStringUtils.random(8,true,true));
|
|
|
httpRestClient.defaultPost(HttpUriContants.USER_UPDATE_PWD, user, BaseResponse.class);
|
|
|
userAuthLocal.flushUser(name);
|
|
|
return new ModelAndView("dashBoard/dashBoard");
|
...
|
...
|
@@ -86,7 +87,7 @@ public class UserCtrl { |
|
|
model.addAttribute("message", "旧密码错误");
|
|
|
return new ModelAndView("user/modifypwd");
|
|
|
}
|
|
|
user.setPwd(MD5Util.encryption(newpwd));
|
|
|
user.setPwd(newpwd);
|
|
|
httpRestClient.defaultPost(HttpUriContants.USER_UPDATE_PWD, user, BaseResponse.class);
|
|
|
session.removeAttribute("user");
|
|
|
userAuthLocal.flushUser(name);
|
...
|
...
|
|