道路污染接口优化
This commit is contained in:
parent
b937b64164
commit
ecd9d97bef
|
@ -114,7 +114,7 @@ public class RoadDataService {
|
||||||
|
|
||||||
public List<RoadData> listRoadDataByTimeRegion(String start,String end){
|
public List<RoadData> listRoadDataByTimeRegion(String start,String end){
|
||||||
QueryWrapper<RoadData> wrapper = new QueryWrapper<>();
|
QueryWrapper<RoadData> wrapper = new QueryWrapper<>();
|
||||||
wrapper.between("dt",start,end);
|
wrapper.between("dt",start,end).gt("pm10",150);
|
||||||
List<RoadData> list = roadDataMapper.selectList(wrapper);
|
List<RoadData> list = roadDataMapper.selectList(wrapper);
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,8 +18,10 @@
|
||||||
|
|
||||||
<select id="selectRoadData" resultType="com.hisense.monitormanage.entity.RoadData">
|
<select id="selectRoadData" resultType="com.hisense.monitormanage.entity.RoadData">
|
||||||
SELECT * FROM t_road_data WHERE pm10 > 150 ORDER BY dt DESC
|
SELECT * FROM t_road_data WHERE pm10 > 150 ORDER BY dt DESC
|
||||||
<bind name="page" value="(page-1)*pageSize"/>
|
<if test="page!=null and '' != page and pageSize != null and '' != pageSize">
|
||||||
limit #{page},#{pageSize}
|
<bind name="page" value="(page-1)*pageSize"/>
|
||||||
|
limit #{page},#{pageSize}
|
||||||
|
</if>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getByMaxId" resultType="com.hisense.monitormanage.entity.RoadData">
|
<select id="getByMaxId" resultType="com.hisense.monitormanage.entity.RoadData">
|
||||||
|
|
Loading…
Reference in New Issue