Merge remote-tracking branch 'origin/dev-nx' into dev-nx
This commit is contained in:
commit
02e4f72d97
|
|
@ -57,10 +57,10 @@ public class TokenController {
|
||||||
|
|
||||||
//web端登录
|
//web端登录
|
||||||
@PostMapping("login")
|
@PostMapping("login")
|
||||||
public R<?> login(@RequestBody LoginBody form) throws Exception {
|
public R<?> login(@RequestBody LoginBody form) {
|
||||||
String decryptedData = RsaUtil.decryptByPrivateKey(form.getPassword(), privateKey);
|
//String decryptedData = RsaUtil.decryptByPrivateKey(form.getPassword(), privateKey);
|
||||||
// 用户登录
|
// 用户登录
|
||||||
LoginUser userInfo = sysLoginService.login(form.getUsername(), decryptedData);
|
LoginUser userInfo = sysLoginService.login(form.getUsername(), form.getPassword());
|
||||||
String uuid = form.getUuid();
|
String uuid = form.getUuid();
|
||||||
String captcha = redisService.getCacheObject(CacheConstants.CAPTCHA_CODE_KEY + uuid).toString();
|
String captcha = redisService.getCacheObject(CacheConstants.CAPTCHA_CODE_KEY + uuid).toString();
|
||||||
if (StringUtils.isBlank(captcha)) {
|
if (StringUtils.isBlank(captcha)) {
|
||||||
|
|
|
||||||
|
|
@ -99,7 +99,7 @@ public class SysProfileController extends BaseController {
|
||||||
@Log(title = "个人信息", businessType = BusinessType.UPDATE)
|
@Log(title = "个人信息", businessType = BusinessType.UPDATE)
|
||||||
@PutMapping("/updatePwd")
|
@PutMapping("/updatePwd")
|
||||||
public AjaxResult updatePwd(String oldPassword, String newPassword) {
|
public AjaxResult updatePwd(String oldPassword, String newPassword) {
|
||||||
String username = SecurityUtils.getUsername();
|
String username = SecurityUtils.getLoginUser().getUsername();
|
||||||
SysUser user = userService.selectUserByUserName(username);
|
SysUser user = userService.selectUserByUserName(username);
|
||||||
String password = user.getPassword();
|
String password = user.getPassword();
|
||||||
if (!SecurityUtils.matchesPassword(oldPassword, password)) {
|
if (!SecurityUtils.matchesPassword(oldPassword, password)) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue