mirror of
https://github.com/dromara/RuoYi-Vue-Plus.git
synced 2025-09-24 07:19:46 +08:00
update 简化 stream 代码写法 (java 16) xx.collect(Collectors.toList()) => xx.toList() ;
update 简化 instanceof 代码写法 (java 12) 直接在后面定义变量 ; update 简化 switch 代码写法 (java 12) ;
This commit is contained in:
@ -94,7 +94,7 @@ public class CacheController {
|
||||
if (isCacheNames(cacheName)) {
|
||||
Set<Object> keys = CacheUtils.keys(cacheName);
|
||||
if (CollUtil.isNotEmpty(keys)) {
|
||||
cacheKeys = keys.stream().map(Object::toString).collect(Collectors.toList());
|
||||
cacheKeys = keys.stream().map(Object::toString).toList();
|
||||
}
|
||||
} else {
|
||||
cacheKeys = RedisUtils.keys(cacheName + "*");
|
||||
|
@ -52,7 +52,7 @@ public class SysOssServiceImpl implements ISysOssService {
|
||||
public TableDataInfo<SysOssVo> queryPageList(SysOssBo bo, PageQuery pageQuery) {
|
||||
LambdaQueryWrapper<SysOss> lqw = buildQueryWrapper(bo);
|
||||
Page<SysOssVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
List<SysOssVo> filterResult = result.getRecords().stream().map(this::matchingUrl).collect(Collectors.toList());
|
||||
List<SysOssVo> filterResult = result.getRecords().stream().map(this::matchingUrl).toList();
|
||||
result.setRecords(filterResult);
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
Reference in New Issue
Block a user