mirror of
http://git.pig4cloud.com/pig/pigx.git
synced 2026-11-11 13:19:01 +08:00
🐛 Fixing a bug. 令牌查询报错
This commit is contained in:
1 parent
f6fbd50995
commit
436b5748c0
2 files changed
+3
-3
No files matched your search
@@ -192,14 +192,14 @@ public class PigTokenEndpoint {
|
||||
*/
|
||||
@Inner
|
||||
@PostMapping("/page")
|
||||
public R<Page> tokenList(@RequestBody Map<String, Object> params) {
|
||||
public R<Page<TokenVo>> tokenList(@RequestBody Map<String, Object> params) {
|
||||
// 根据分页参数获取对应数据
|
||||
String key = String.format("%s::*", CacheConstants.PROJECT_OAUTH_ACCESS);
|
||||
int current = MapUtil.getInt(params, CommonConstants.CURRENT);
|
||||
int size = MapUtil.getInt(params, CommonConstants.SIZE);
|
||||
Set<String> keys = redisTemplate.keys(key);
|
||||
List<String> pages = keys.stream().skip((current - 1) * size).limit(size).collect(Collectors.toList());
|
||||
Page result = new Page(current, size);
|
||||
Page<TokenVo> result = new Page(current, size);
|
||||
|
||||
List<TokenVo> tokenVoList = redisTemplate.opsForValue().multiGet(pages).stream().map(obj -> {
|
||||
OAuth2Authorization authorization = (OAuth2Authorization) obj;
|
||||
|
||||
+1
-1
@@ -43,7 +43,7 @@ public interface RemoteTokenService {
|
||||
* @return page
|
||||
*/
|
||||
@GetMapping("/token/page")
|
||||
R<Page> getTokenPage(@SpringQueryMap Map<String, Object> params,
|
||||
R<Page> getTokenPage(@RequestBody Map<String, Object> params,
|
||||
@RequestHeader(SecurityConstants.FROM) String from);
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user