Merge branch 'develop' of https://gitee.com/likeshop_gitee/likeadmin-java into develop
This commit is contained in:
commit
3137a59566
|
|
@ -24,8 +24,11 @@ public class StpInException {
|
|||
@ResponseStatus(HttpStatus.OK)
|
||||
@ExceptionHandler(NotLoginException.class)
|
||||
@ResponseBody
|
||||
public AjaxResult<Object> handleNotLoginException(){
|
||||
return AjaxResult.failed(HttpEnum.TOKEN_INVALID.getCode(), HttpEnum.TOKEN_INVALID.getMsg());
|
||||
public AjaxResult<Object> handleNotLoginException(NotLoginException e){
|
||||
String msg = e.getMessage().split(":")[0];
|
||||
msg = msg.replaceFirst("Token", "您");
|
||||
msg = msg.trim().equals("") ? HttpEnum.TOKEN_INVALID.getMsg() : msg;
|
||||
return AjaxResult.failed(HttpEnum.TOKEN_INVALID.getCode(), msg);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ import javax.annotation.Resource;
|
|||
* 相册管理
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("api/common/album")
|
||||
@RequestMapping("api/albums")
|
||||
public class AlbumsController {
|
||||
|
||||
@Resource
|
||||
|
|
|
|||
|
|
@ -370,6 +370,8 @@ public class SystemAuthAdminServiceImpl implements ISystemAuthAdminService {
|
|||
model.setDeleteTime(System.currentTimeMillis() / 1000);
|
||||
systemAuthAdminMapper.updateById(model);
|
||||
this.cacheAdminUserByUid(id);
|
||||
|
||||
StpUtil.kickout(id);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -395,6 +397,10 @@ public class SystemAuthAdminServiceImpl implements ISystemAuthAdminService {
|
|||
systemAuthAdmin.setUpdateTime(TimeUtil.timestamp());
|
||||
systemAuthAdminMapper.updateById(systemAuthAdmin);
|
||||
this.cacheAdminUserByUid(id);
|
||||
|
||||
if (disable.equals(1)) {
|
||||
StpUtil.kickout(id);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -404,7 +410,7 @@ public class SystemAuthAdminServiceImpl implements ISystemAuthAdminService {
|
|||
public void cacheAdminUserByUid(Integer id) {
|
||||
SystemAuthAdmin sysAdmin = systemAuthAdminMapper.selectOne(
|
||||
new QueryWrapper<SystemAuthAdmin>()
|
||||
.select("id,role,username,nickname,is_disable,is_delete")
|
||||
.select("id,role,username,nickname,is_multipoint,is_disable,is_delete")
|
||||
.eq("id", id)
|
||||
.last("limit 1"));
|
||||
|
||||
|
|
@ -413,6 +419,7 @@ public class SystemAuthAdminServiceImpl implements ISystemAuthAdminService {
|
|||
user.put("roleId", sysAdmin.getRole());
|
||||
user.put("username", sysAdmin.getUsername());
|
||||
user.put("nickname", sysAdmin.getNickname());
|
||||
user.put("isMultipoint", sysAdmin.getIsMultipoint());
|
||||
user.put("isDisable", sysAdmin.getIsDisable());
|
||||
user.put("isDelete", sysAdmin.getIsDelete());
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue