mirror of
http://git.pig4cloud.com/pig/pigx.git
synced 2026-11-08 12:39:05 +08:00
feat(sys-token): 增强token管理功能并修复权限控制
- 为分页查询接口添加sys_token_del权限注解 - 修复删除接口的token参数命名不一致问题 - 统一代码缩进格式为4个空格
This commit is contained in:
1 parent
6f9d41b624
commit
99d295bfa8
1 file changed
+27
-24
+27
-24
@@ -43,31 +43,34 @@ import java.util.Map;
|
||||
@SecurityRequirement(name = HttpHeaders.AUTHORIZATION)
|
||||
public class SysTokenController {
|
||||
|
||||
private final RemoteTokenService remoteTokenService;
|
||||
private final RemoteTokenService remoteTokenService;
|
||||
|
||||
/**
|
||||
* 分页token 信息
|
||||
* @param params 参数集
|
||||
* @return token集合
|
||||
*/
|
||||
@RequestMapping("/page")
|
||||
public R getTokenPage(@RequestBody Map<String, Object> params) {
|
||||
return remoteTokenService.getTokenPage(params);
|
||||
}
|
||||
/**
|
||||
* 分页token 信息
|
||||
*
|
||||
* @param params 参数集
|
||||
* @return token集合
|
||||
*/
|
||||
@RequestMapping("/page")
|
||||
@HasPermission("sys_token_del")
|
||||
public R getTokenPage(@RequestBody Map<String, Object> params) {
|
||||
return remoteTokenService.getTokenPage(params);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除
|
||||
* @param token getTokenPage
|
||||
* @return success/false
|
||||
*/
|
||||
@SysLog("删除用户token")
|
||||
@DeleteMapping("/delete")
|
||||
@HasPermission("sys_token_del")
|
||||
public R removeById(@RequestBody String[] tokens) {
|
||||
for (String token : tokens) {
|
||||
remoteTokenService.removeTokenById(token);
|
||||
}
|
||||
return R.ok();
|
||||
}
|
||||
/**
|
||||
* 删除
|
||||
*
|
||||
* @param token getTokenPage
|
||||
* @return success/false
|
||||
*/
|
||||
@SysLog("删除用户token")
|
||||
@DeleteMapping("/delete")
|
||||
@HasPermission("sys_token_del")
|
||||
public R removeById(@RequestBody String[] tokens) {
|
||||
for (String token : tokens) {
|
||||
remoteTokenService.removeTokenById(token);
|
||||
}
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user