管理员修改密码,强退功能
parent
b5e220a675
commit
ad656fd4ff
|
@ -84,6 +84,18 @@ public class SysUser extends BaseEntity {
|
|||
* 密码
|
||||
*/
|
||||
private String password;
|
||||
/**
|
||||
* tokenId
|
||||
*/
|
||||
private String tokenId;
|
||||
|
||||
public String getTokenId() {
|
||||
return tokenId;
|
||||
}
|
||||
|
||||
public void setTokenId(String tokenId) {
|
||||
this.tokenId = tokenId;
|
||||
}
|
||||
|
||||
/**
|
||||
* 帐号状态(0正常 1停用)
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
package com.muyu.system.controller;
|
||||
|
||||
import com.muyu.common.core.constant.CacheConstants;
|
||||
import com.muyu.common.core.domain.Result;
|
||||
import com.muyu.common.core.utils.StringUtils;
|
||||
import com.muyu.common.core.utils.poi.ExcelUtil;
|
||||
|
@ -7,6 +8,7 @@ import com.muyu.common.core.web.controller.BaseController;
|
|||
import com.muyu.common.core.web.page.TableDataInfo;
|
||||
import com.muyu.common.log.annotation.Log;
|
||||
import com.muyu.common.log.enums.BusinessType;
|
||||
import com.muyu.common.redis.service.RedisService;
|
||||
import com.muyu.common.security.annotation.InnerAuth;
|
||||
import com.muyu.common.security.annotation.RequiresPermissions;
|
||||
import com.muyu.common.security.utils.SecurityUtils;
|
||||
|
@ -41,6 +43,9 @@ public class SysUserController extends BaseController {
|
|||
@Autowired
|
||||
private SysUserService userService;
|
||||
|
||||
@Autowired
|
||||
private RedisService redisService;
|
||||
|
||||
@Autowired
|
||||
private SysRoleService roleService;
|
||||
|
||||
|
@ -238,6 +243,9 @@ public class SysUserController extends BaseController {
|
|||
userService.checkUserDataScope(user.getUserId());
|
||||
user.setPassword(SecurityUtils.encryptPassword(user.getPassword()));
|
||||
user.setUpdateBy(SecurityUtils.getUsername());
|
||||
if (user.getTokenId() !=null || !"".equals(user.getTokenId())){
|
||||
redisService.deleteObject(CacheConstants.LOGIN_TOKEN_KEY + user.getTokenId());
|
||||
}
|
||||
return toAjax(userService.resetPwd(user));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue