Commit cc4ff269 authored by wujiang's avatar wujiang

修改查询

parent 62aae5d9
...@@ -171,7 +171,10 @@ public class TdInfoQueryController extends BaseController { ...@@ -171,7 +171,10 @@ public class TdInfoQueryController extends BaseController {
String orderColumn = convert(split[0]) + " " + replace; String orderColumn = convert(split[0]) + " " + replace;
dto.setSortOne(orderColumn); dto.setSortOne(orderColumn);
} }
if(dto.getEndDateTs()==null&&dto.getStartDateTs()==null)
{
return ResponseHelper.buildResponse(resultPage);
}
List<FanHealthIndex> fanHealthIndexIPage = fanHealthIndexMapper.getInfoByPage(dto); List<FanHealthIndex> fanHealthIndexIPage = fanHealthIndexMapper.getInfoByPage(dto);
fanHealthIndexIPage.forEach(item -> { fanHealthIndexIPage.forEach(item -> {
item.setHealthIndex(Double.valueOf(df.format(item.getHealthIndex()))); item.setHealthIndex(Double.valueOf(df.format(item.getHealthIndex())));
...@@ -230,9 +233,6 @@ public class TdInfoQueryController extends BaseController { ...@@ -230,9 +233,6 @@ public class TdInfoQueryController extends BaseController {
Long startTs = pvHealthIndexMapper.getTsByRecDate("pv_health_index_data", startDate+" 00:00:00", "Asc "); Long startTs = pvHealthIndexMapper.getTsByRecDate("pv_health_index_data", startDate+" 00:00:00", "Asc ");
dto.setStartDateTs(startTs); dto.setStartDateTs(startTs);
} }
} }
if (CharSequenceUtil.isNotEmpty(dto.getEndDate())) { if (CharSequenceUtil.isNotEmpty(dto.getEndDate())) {
String dateNowShortStr = DateUtils.getDateNowShortStr(); String dateNowShortStr = DateUtils.getDateNowShortStr();
...@@ -287,6 +287,10 @@ public class TdInfoQueryController extends BaseController { ...@@ -287,6 +287,10 @@ public class TdInfoQueryController extends BaseController {
} }
String join = String.join(",", orderByList); String join = String.join(",", orderByList);
dto.setOrderColumns(join); dto.setOrderColumns(join);
if(dto.getEndDateTs()==null&&dto.getStartDateTs()==null)
{
return ResponseHelper.buildResponse(resultPage);
}
List<PvHealthIndex> pvHealthIndexIPage = pvHealthIndexMapper.getInfoByPage(dto); List<PvHealthIndex> pvHealthIndexIPage = pvHealthIndexMapper.getInfoByPage(dto);
pvHealthIndexIPage.forEach(item -> { pvHealthIndexIPage.forEach(item -> {
item.setHealthIndex(Double.valueOf(df.format(item.getHealthIndex()))); item.setHealthIndex(Double.valueOf(df.format(item.getHealthIndex())));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment