添加查询全部工地信息接口
This commit is contained in:
parent
85157456b8
commit
28092b60cd
|
@ -59,6 +59,9 @@ public class Controller {
|
|||
@Autowired
|
||||
private BuildingSiteService buildingSitrService;
|
||||
|
||||
@Autowired
|
||||
private BuildingSiteMapper buildingSiteMapper;
|
||||
|
||||
@Autowired
|
||||
private ChannelPictureMapper channelPictureMapper;
|
||||
|
||||
|
@ -504,4 +507,18 @@ public class Controller {
|
|||
list = buildingSitrService.listBuildingSiteByPoints(longitude,latitude,radius);
|
||||
return Result.success(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询全部工地信息
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("selectBuildSite")
|
||||
@ApiOperation("查询全部工地信息")
|
||||
public Result selectBuildSite(){
|
||||
List<BuildingSite> buildingSites = buildingSiteMapper.selectBuildSite();
|
||||
Result success = Result.success(buildingSites);
|
||||
return success;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -2,6 +2,9 @@ package com.hisense.monitormanage.mapper;
|
|||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.hisense.monitormanage.entity.BuildingSite;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author admin
|
||||
|
@ -11,4 +14,7 @@ import com.hisense.monitormanage.entity.BuildingSite;
|
|||
* @createTime 2022年05月12日 13:59:00
|
||||
*/
|
||||
public interface BuildingSiteMapper extends BaseMapper<BuildingSite> {
|
||||
|
||||
@Select("select * from t_building_site")
|
||||
List<BuildingSite> selectBuildSite();
|
||||
}
|
||||
|
|
|
@ -80,7 +80,7 @@ public class SanitationService {
|
|||
@Scheduled(cron = "0 0 8 * * ?")
|
||||
public void saveSanitationTaskScheduled(){
|
||||
QueryWrapper<SanitationTask> wrapper = new QueryWrapper<>();
|
||||
wrapper.orderByDesc("updatetime");
|
||||
wrapper.orderByDesc("updatetime").last("limit 1");
|
||||
SanitationTask sanitationTask = sanitationTaskMapper.selectOne(wrapper);
|
||||
List<Map> maps = new ArrayList<>();
|
||||
|
||||
|
|
|
@ -5,13 +5,13 @@
|
|||
<insert id="batchSave" parameterType="java.util.List">
|
||||
INSERT INTO t_road_data
|
||||
(region_name,street_name,road_name,start,end,lng,lat,pm10,pm25,desc_pm10_rank,asc_pm10_rank,
|
||||
desc_pm25_rank,asc_pm25_rank,points)
|
||||
desc_pm25_rank,asc_pm25_rank,points,dt)
|
||||
VALUES
|
||||
<foreach collection="list" item="item" separator="," >
|
||||
(
|
||||
#{item.regionName},#{item.streetName},#{item.roadName},#{item.start},#{item.end},
|
||||
#{item.lng},#{item.lat},#{item.pm10},#{item.pm25},#{item.desc_pm10_rank},
|
||||
#{item.asc_pm10_rank},#{item.desc_pm25_rank},#{item.asc_pm25_rank},#{item.points}
|
||||
#{item.asc_pm10_rank},#{item.desc_pm25_rank},#{item.asc_pm25_rank},#{item.points},#{item.dt}
|
||||
)
|
||||
</foreach>
|
||||
</insert>
|
||||
|
|
Loading…
Reference in New Issue