mirror of
http://git.pig4cloud.com/pig/pigx.git
synced 2026-11-14 06:09:03 +08:00
♻️ Refactoring code. pigx-upms-biz 适配最新V5 UI
This commit is contained in:
1 parent
d6a86c275c
commit
4103227078
1 file changed
+26
-22
+26
-22
@@ -41,29 +41,33 @@ import java.util.Map;
|
||||
@SecurityRequirement(name = HttpHeaders.AUTHORIZATION)
|
||||
public class SysTokenController {
|
||||
|
||||
private final RemoteTokenService remoteTokenService;
|
||||
private final RemoteTokenService remoteTokenService;
|
||||
|
||||
/**
|
||||
* 分页token 信息
|
||||
* @param params 参数集
|
||||
* @return token集合
|
||||
*/
|
||||
@GetMapping("/page")
|
||||
public R getTokenPage(@RequestParam Map<String, Object> params) {
|
||||
// 获取请求的
|
||||
return remoteTokenService.getTokenPage(params, SecurityConstants.FROM_IN);
|
||||
}
|
||||
/**
|
||||
* 分页token 信息
|
||||
*
|
||||
* @param params 参数集
|
||||
* @return token集合
|
||||
*/
|
||||
@RequestMapping("/page")
|
||||
public R getTokenPage(@RequestBody Map<String, Object> params) {
|
||||
return remoteTokenService.getTokenPage(params, SecurityConstants.FROM_IN);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除
|
||||
* @param token getTokenPage
|
||||
* @return success/false
|
||||
*/
|
||||
@SysLog("删除用户token")
|
||||
@DeleteMapping("/{token}")
|
||||
@PreAuthorize("@pms.hasPermission('sys_token_del')")
|
||||
public R removeById(@PathVariable String token) {
|
||||
return remoteTokenService.removeTokenById(token, SecurityConstants.FROM_IN);
|
||||
}
|
||||
/**
|
||||
* 删除
|
||||
*
|
||||
* @param token getTokenPage
|
||||
* @return success/false
|
||||
*/
|
||||
@SysLog("删除用户token")
|
||||
@DeleteMapping("/delete")
|
||||
@PreAuthorize("@pms.hasPermission('sys_token_del')")
|
||||
public R removeById(@RequestBody String[] tokens) {
|
||||
for (String token : tokens) {
|
||||
remoteTokenService.removeTokenById(token, SecurityConstants.FROM_IN);
|
||||
}
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user