道路污染事件时间显示去掉时分秒
This commit is contained in:
parent
0e958c92ea
commit
793fdaec52
|
@ -273,8 +273,11 @@ public class QidiController {
|
|||
@ApiOperation("查询道路污染数据,根据dt从表中查询,参考输入-2022-05-10 00:00:00,只能查询当前日期前一天及以前的")
|
||||
@ApiImplicitParam(name="dt",value = "时间",paramType = "query",required = true,dataType = "string")
|
||||
public Result listRoadData(@RequestParam(value="dt") String dt){
|
||||
List<RoadData> list = roadDataService.listRoadData(dt);
|
||||
return Result.success(list);
|
||||
List<RoadData> roadData = roadDataService.listRoadData(dt);
|
||||
roadData.forEach(roadData1 -> {
|
||||
roadData1.setDt(roadData1.getDt().substring(0,10));
|
||||
});
|
||||
return Result.success(roadData);
|
||||
}
|
||||
//根据输入的日期间隔查询道路污染数据(例如:2022-05-10 00:00:00至2022-05-11 00:00:00)
|
||||
@GetMapping(value="listRoadDataByTimeRegion")
|
||||
|
@ -287,8 +290,11 @@ public class QidiController {
|
|||
@RequestParam(value="start") String start,
|
||||
@RequestParam(value="end") String end
|
||||
){
|
||||
List<RoadData> list = roadDataService.listRoadDataByTimeRegion(start,end);
|
||||
return Result.success(list);
|
||||
List<RoadData> roadData = roadDataService.listRoadDataByTimeRegion(start,end);
|
||||
roadData.forEach(roadData1 -> {
|
||||
roadData1.setDt(roadData1.getDt().substring(0,10));
|
||||
});
|
||||
return Result.success(roadData);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue