diff --git a/src/main/java/com/hisense/monitormanage/mapper/BuildingRecordsMapper.java b/src/main/java/com/hisense/monitormanage/mapper/BuildingRecordsMapper.java index b147624..a049aa7 100644 --- a/src/main/java/com/hisense/monitormanage/mapper/BuildingRecordsMapper.java +++ b/src/main/java/com/hisense/monitormanage/mapper/BuildingRecordsMapper.java @@ -46,11 +46,10 @@ public interface BuildingRecordsMapper extends BaseMapper { Integer selectCountNoice(); @Select("select br.*,bs.sgwz,bs.jd,bs.wd,bs.ssdq,bs.yjsg from t_building_records br JOIN t_building_new_site bs on br.project_name = bs.gdmc" + - " where br.project_name like concat('%',#{projectName},'%')") + " where br.project_name like concat('%',#{projectName},'%') ORDER BY br.push_time DESC LIMIT 1") List selectByProjectName(String projectName); - @Select("select rns.*,cp.pic_url from (select bs.*,br.project_name,br.push_time,br.pm10,br.noice from t_building_records br " + - "JOIN t_building_new_site bs on br.project_name = bs.gdmc where (bs.jd between #{jd} and #{jd1}) and (bs.wd between #{wd} and #{wd1} )) rns " + + @Select("select rns.*,cp.pic_url from (select bs.*,br.project_name,br.push_time,br.pm10,br.noice from (select * from t_building_records ORDER BY push_time DESC LIMIT 1639) br JOIN t_building_new_site bs on br.project_name = bs.gdmc where (bs.jd between #{jd} and #{jd1}) and (bs.wd between #{wd} and #{wd1} ) ORDER BY br.push_time DESC LIMIT 93) rns " + "LEFT JOIN t_channel_picture cp ON rns.channel_code = cp.channel_code") List selectByJdWd(@Param("jd") Double jd, @Param("jd1") Double jd1,