perf(系统管理-日志管理): 优化查询日志api过滤条件

This commit is contained in:
fit2cloud-chenyw 2022-08-30 21:17:32 +08:00
parent 6aa8080132
commit 44ef6be371

View File

@ -77,7 +77,8 @@ public class LogService {
List<String> ids = null;
GridExample gridExample = request.convertExample();
gridExample.setExtendCondition(keyWord);
LogQueryParam logQueryParam = BeanUtils.copyBean(new LogQueryParam(), gridExample);
LogQueryParam logQueryParam = gson.fromJson(gson.toJson(gridExample), LogQueryParam.class);
if (StringUtils.isNotBlank(keyWord)) {
List<FolderItem> types = types();
ids = types.stream().filter(item -> item.getName().toLowerCase().contains(keyWord.toLowerCase())).map(FolderItem::getId).collect(Collectors.toList());
@ -279,7 +280,7 @@ public class LogService {
try {
GridExample gridExample = request.convertExample();
gridExample.setExtendCondition(keyWord);
LogQueryParam logQueryParam = BeanUtils.copyBean(new LogQueryParam(), gridExample);
LogQueryParam logQueryParam = gson.fromJson(gson.toJson(gridExample), LogQueryParam.class);
if (StringUtils.isNotBlank(keyWord)) {
List<FolderItem> types = types();
ids = types.stream().filter(item -> item.getName().toLowerCase().contains(keyWord.toLowerCase())).map(FolderItem::getId).collect(Collectors.toList());