Commit 9c5e45e4 by 林永健

feat(project-group): 添加警告类型显示控制功能

- 在WarningTypeOptionDTO中新增showType字段用于控制显示隐藏
- 在PgWarningTypeDict实体中新增showType数据库映射字段
- 修改ProjectGroupController中的警告元数据查询接口
- 添加基于showType=0的过滤逻辑以只返回需要展示的警告类型
- 引入Objects和Collectors依赖进行流式处理过滤
1 parent 397abca2
......@@ -18,6 +18,8 @@ import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import java.util.List;
import java.util.Objects;
import java.util.stream.Collectors;
/**
* 项目组管理控制器。
......@@ -178,7 +180,8 @@ public class ProjectGroupController {
log.error(response.getMessage());
return RopResponse.error(response.getError(), response.getMessage());
}
return RopResponse.success(response.getResult());
return RopResponse.success(response.getResult().stream()
.filter(item -> Objects.equals(item.getShowType(), 0)).collect(Collectors.toList()));
} catch (Exception e) {
log.error("dj.api.strategy.project.group.warning.meta.types exception", e);
return RopResponse.error(e.getMessage());
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!