道路污染接口优化

This commit is contained in:
wuweida 2022-08-16 14:37:57 +08:00
parent b937b64164
commit ecd9d97bef
2 changed files with 5 additions and 3 deletions

View File

@ -114,7 +114,7 @@ public class RoadDataService {
public List<RoadData> listRoadDataByTimeRegion(String start,String end){
QueryWrapper<RoadData> wrapper = new QueryWrapper<>();
wrapper.between("dt",start,end);
wrapper.between("dt",start,end).gt("pm10",150);
List<RoadData> list = roadDataMapper.selectList(wrapper);
return list;
}

View File

@ -18,8 +18,10 @@
<select id="selectRoadData" resultType="com.hisense.monitormanage.entity.RoadData">
SELECT * FROM t_road_data WHERE pm10 > 150 ORDER BY dt DESC
<bind name="page" value="(page-1)*pageSize"/>
limit #{page},#{pageSize}
<if test="page!=null and '' != page and pageSize != null and '' != pageSize">
<bind name="page" value="(page-1)*pageSize"/>
limit #{page},#{pageSize}
</if>
</select>
<select id="getByMaxId" resultType="com.hisense.monitormanage.entity.RoadData">