添加道路污染累计事件接口
This commit is contained in:
parent
cfc3023d04
commit
c8575c1dab
|
@ -571,19 +571,13 @@ public class Controller {
|
|||
}
|
||||
|
||||
/**
|
||||
* 分页查询全部道路污染数据
|
||||
* @param page
|
||||
* @param pageSize
|
||||
* 查询全部道路污染累计事件数量
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("selectRoadData")
|
||||
@ApiOperation("分页查询全部道路污染数据")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "page", value = "页码", paramType = "query", dataType = "Integer", required = true),
|
||||
@ApiImplicitParam(name = "pageSize", value = "大小", paramType = "query", dataType = "Integer", required = true)
|
||||
})
|
||||
public Result selectRoadData(Integer page,Integer pageSize){
|
||||
List<RoadData> roadData = roadDataMapper.selectRoadData(page,pageSize);
|
||||
@ApiOperation("查询全部道路污染累计事件数量")
|
||||
public Result selectRoadData(){
|
||||
List<RoadData> roadData = roadDataService.selectRoadData();
|
||||
Result success = Result.success(roadData);
|
||||
return success;
|
||||
}
|
||||
|
|
|
@ -17,5 +17,5 @@ import java.util.Map;
|
|||
public interface RoadDataMapper extends BaseMapper<RoadData> {
|
||||
public void batchSave(List<Map> list);
|
||||
|
||||
List<RoadData> selectRoadData(@Param("page") Integer page, @Param("pageSize") Integer pageSize);
|
||||
/*List<RoadData> selectRoadData(@Param("page") Integer page, @Param("pageSize") Integer pageSize);*/
|
||||
}
|
||||
|
|
|
@ -227,7 +227,8 @@ public class MonitorService {
|
|||
picture.setPicUrl(picUrl);
|
||||
/*picture.setInsertTime(new Date());
|
||||
channelPictureMapper.insert(picture);*/
|
||||
if (channelCode == null){
|
||||
ChannelPicture id = channelPictureMapper.selectById(channelCode);
|
||||
if (id == null){
|
||||
channelPictureMapper.insert(picture);
|
||||
}else {
|
||||
QueryWrapper<ChannelPicture> queryWrapper = new QueryWrapper<>();
|
||||
|
@ -269,7 +270,8 @@ public class MonitorService {
|
|||
picture.setPicUrl(picUrl);
|
||||
/*picture.setInsertTime(new Date());
|
||||
channelPictureMapper.insert(picture);*/
|
||||
if (channelCode == null){
|
||||
ChannelPicture id = channelPictureMapper.selectById(channelCode);
|
||||
if (id == null){
|
||||
channelPictureMapper.insert(picture);
|
||||
}else {
|
||||
QueryWrapper<ChannelPicture> queryWrapper = new QueryWrapper<>();
|
||||
|
@ -311,7 +313,8 @@ public class MonitorService {
|
|||
picture.setPicUrl(picUrl);
|
||||
/*picture.setInsertTime(new Date());
|
||||
channelPictureMapper.insert(picture);*/
|
||||
if (channelCode == null){
|
||||
ChannelPicture id = channelPictureMapper.selectById(channelCode);
|
||||
if (id == null){
|
||||
channelPictureMapper.insert(picture);
|
||||
}else {
|
||||
QueryWrapper<ChannelPicture> queryWrapper = new QueryWrapper<>();
|
||||
|
@ -353,7 +356,8 @@ public class MonitorService {
|
|||
picture.setPicUrl(picUrl);
|
||||
/*picture.setInsertTime(new Date());
|
||||
channelPictureMapper.insert(picture);*/
|
||||
if (channelCode == null){
|
||||
ChannelPicture id = channelPictureMapper.selectById(channelCode);
|
||||
if (id == null){
|
||||
channelPictureMapper.insert(picture);
|
||||
}else {
|
||||
QueryWrapper<ChannelPicture> queryWrapper = new QueryWrapper<>();
|
||||
|
@ -395,7 +399,8 @@ public class MonitorService {
|
|||
picture.setPicUrl(picUrl);
|
||||
/*picture.setInsertTime(new Date());
|
||||
channelPictureMapper.insert(picture);*/
|
||||
if (channelCode == null){
|
||||
ChannelPicture id = channelPictureMapper.selectById(channelCode);
|
||||
if (id == null){
|
||||
channelPictureMapper.insert(picture);
|
||||
}else {
|
||||
QueryWrapper<ChannelPicture> queryWrapper = new QueryWrapper<>();
|
||||
|
@ -437,7 +442,8 @@ public class MonitorService {
|
|||
picture.setPicUrl(picUrl);
|
||||
/*picture.setInsertTime(new Date());
|
||||
channelPictureMapper.insert(picture);*/
|
||||
if (channelCode == null){
|
||||
ChannelPicture id = channelPictureMapper.selectById(channelCode);
|
||||
if (id == null){
|
||||
channelPictureMapper.insert(picture);
|
||||
}else {
|
||||
QueryWrapper<ChannelPicture> queryWrapper = new QueryWrapper<>();
|
||||
|
@ -479,7 +485,8 @@ public class MonitorService {
|
|||
picture.setPicUrl(picUrl);
|
||||
/*picture.setInsertTime(new Date());
|
||||
channelPictureMapper.insert(picture);*/
|
||||
if (channelCode == null){
|
||||
ChannelPicture id = channelPictureMapper.selectById(channelCode);
|
||||
if (id == null){
|
||||
channelPictureMapper.insert(picture);
|
||||
}else {
|
||||
QueryWrapper<ChannelPicture> queryWrapper = new QueryWrapper<>();
|
||||
|
@ -521,7 +528,8 @@ public class MonitorService {
|
|||
picture.setPicUrl(picUrl);
|
||||
/*picture.setInsertTime(new Date());
|
||||
channelPictureMapper.insert(picture);*/
|
||||
if (channelCode == null){
|
||||
ChannelPicture id = channelPictureMapper.selectById(channelCode);
|
||||
if (id == null){
|
||||
channelPictureMapper.insert(picture);
|
||||
}else {
|
||||
QueryWrapper<ChannelPicture> queryWrapper = new QueryWrapper<>();
|
||||
|
@ -562,7 +570,8 @@ public class MonitorService {
|
|||
picture.setPicUrl(picUrl);
|
||||
/*picture.setInsertTime(new Date());
|
||||
channelPictureMapper.insert(picture);*/
|
||||
if (channelCode == null){
|
||||
ChannelPicture id = channelPictureMapper.selectById(channelCode);
|
||||
if (id == null){
|
||||
channelPictureMapper.insert(picture);
|
||||
}else {
|
||||
QueryWrapper<ChannelPicture> queryWrapper = new QueryWrapper<>();
|
||||
|
@ -604,7 +613,8 @@ public class MonitorService {
|
|||
picture.setPicUrl(picUrl);
|
||||
/*picture.setInsertTime(new Date());
|
||||
channelPictureMapper.insert(picture);*/
|
||||
if (channelCode == null){
|
||||
ChannelPicture id = channelPictureMapper.selectById(channelCode);
|
||||
if (id == null){
|
||||
channelPictureMapper.insert(picture);
|
||||
}else {
|
||||
QueryWrapper<ChannelPicture> queryWrapper = new QueryWrapper<>();
|
||||
|
|
|
@ -90,6 +90,13 @@ public class RoadDataService {
|
|||
return list;
|
||||
}
|
||||
|
||||
public List<RoadData> selectRoadData(){
|
||||
QueryWrapper<RoadData> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.gt("pm10",200);
|
||||
List<RoadData> list = roadDataMapper.selectList(queryWrapper);
|
||||
return list;
|
||||
}
|
||||
|
||||
//获取当前日期的时间串,2022-05-08 00:00:00
|
||||
private String dateTimeStr(){
|
||||
LocalDate localDate = LocalDate.now();
|
||||
|
|
|
@ -16,10 +16,10 @@
|
|||
</foreach>
|
||||
</insert>
|
||||
|
||||
<select id="selectRoadData" resultType="com.hisense.monitormanage.entity.RoadData">
|
||||
<!-- <select id="selectRoadData" resultType="com.hisense.monitormanage.entity.RoadData">
|
||||
select * from t_road_data
|
||||
<bind name="page" value="(page-1)*pageSize"/>
|
||||
limit #{page},#{pageSize}
|
||||
</select>
|
||||
</select>-->
|
||||
|
||||
</mapper>
|
Loading…
Reference in New Issue