Commit 4c85f8f7 by 丁伟峰

日志,方便查看

1 parent 66a7fc83
...@@ -8,7 +8,7 @@ import java.util.List; ...@@ -8,7 +8,7 @@ import java.util.List;
@lombok.Data @lombok.Data
@Accessors(chain = true) @Accessors(chain = true)
public class CapacityStatQueryRespDTO { public class CapacityStatQueryRespDTO {
private List<?> content; private List<Content> content;
private String levelType; private String levelType;
private long pageCurrent; private long pageCurrent;
private long pages; private long pages;
......
...@@ -109,6 +109,7 @@ public class CapacityQueryServiceImpl implements CapacityQueryService { ...@@ -109,6 +109,7 @@ public class CapacityQueryServiceImpl implements CapacityQueryService {
List<CapacityStatQueryRespDTO.Content> contents = new ArrayList<>(); List<CapacityStatQueryRespDTO.Content> contents = new ArrayList<>();
for (Object item : stats.getContent()) { for (Object item : stats.getContent()) {
CapacityStatQueryRespDTO.Content content = new CapacityStatQueryRespDTO.Content(); CapacityStatQueryRespDTO.Content content = new CapacityStatQueryRespDTO.Content();
log.info("===== content1: {}", content);
if (item instanceof CapacityOrgStatEntity) { if (item instanceof CapacityOrgStatEntity) {
// cluster/branch查询,都是capacity_org_stat // cluster/branch查询,都是capacity_org_stat
CapacityOrgStatEntity e = (CapacityOrgStatEntity) item; CapacityOrgStatEntity e = (CapacityOrgStatEntity) item;
...@@ -127,8 +128,9 @@ public class CapacityQueryServiceImpl implements CapacityQueryService { ...@@ -127,8 +128,9 @@ public class CapacityQueryServiceImpl implements CapacityQueryService {
.setCapTotal(e.getCapTotal()).setCapUsed(e.getCapUsed()).setCapAdjust(e.getCapAdjust()) .setCapTotal(e.getCapTotal()).setCapUsed(e.getCapUsed()).setCapAdjust(e.getCapAdjust())
.setEngineerNum(e.getEngineerCount()).setUpdateTime(e.getUpdateTime()); .setEngineerNum(e.getEngineerCount()).setUpdateTime(e.getUpdateTime());
} }
log.info("===== content2: {}", content);
contents.add(content); contents.add(content);
} };
contents.stream().sorted( contents.stream().sorted(
Comparator.comparing(CapacityStatQueryRespDTO.Content::getDate)).collect(Collectors.toList()); Comparator.comparing(CapacityStatQueryRespDTO.Content::getDate)).collect(Collectors.toList());
data.setContent(contents); data.setContent(contents);
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!