推送给城管数据更新

This commit is contained in:
wuweida 2022-05-23 15:55:29 +08:00
parent 7a4e4b14fe
commit c440713b68
3 changed files with 43 additions and 4 deletions

View File

@ -59,6 +59,9 @@ public class Controller {
@Autowired @Autowired
private BuildingSiteService buildingSitrService; private BuildingSiteService buildingSitrService;
@Autowired
private ChannelPictureMapper channelPictureMapper;
@GetMapping("all") @GetMapping("all")
public Object all(){ public Object all(){
@ -77,9 +80,9 @@ public class Controller {
*/ */
@GetMapping("cameras") @GetMapping("cameras")
public Result cameras(){ public Result cameras(){
List<ChengguanDto> chengguanDtos = cameraMapper.selectCamera(); List<ChannelPictureDto> channelPictureDtos = channelPictureMapper.selectByProject();
Result success = Result.success(chengguanDtos); Result success = Result.success(channelPictureDtos);
success.setCount(chengguanDtos.size()); success.setCount(channelPictureDtos.size());
return success; return success;
} }
@ -280,12 +283,17 @@ public class Controller {
} }
/** /**
* * 提供给其他项目分页查询摄像头接口
* @param page * @param page
* @param pageSize * @param pageSize
* @return * @return
*/ */
@GetMapping("selectCamera") @GetMapping("selectCamera")
@ApiOperation("提供给其他项目分页查询摄像头接口")
@ApiImplicitParams({
@ApiImplicitParam(name = "page",value = "页码",required = true,dataType = "Integer"),
@ApiImplicitParam(name = "pageSize",value = "页码大小",required = true,dataType = "Integer")
})
public Result selectNLAll(Integer page,Integer pageSize){ public Result selectNLAll(Integer page,Integer pageSize){
List<CameraChannelNLDto> selectNLAll = cameraChannelMapper.selectNLAll(page,pageSize); List<CameraChannelNLDto> selectNLAll = cameraChannelMapper.selectNLAll(page,pageSize);
Result success = Result.success(selectNLAll); Result success = Result.success(selectNLAll);

View File

@ -0,0 +1,24 @@
package com.hisense.monitormanage.dto;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import java.util.Date;
@Data
public class ChannelPictureDto {
private String ssqh;
private String xmmc;
private String xmdz;
private String channelCode;
private String PicUrl;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date insertTime;
}

View File

@ -1,8 +1,15 @@
package com.hisense.monitormanage.mapper; package com.hisense.monitormanage.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hisense.monitormanage.dto.ChannelPictureDto;
import com.hisense.monitormanage.entity.ChannelPicture; import com.hisense.monitormanage.entity.ChannelPicture;
import org.apache.ibatis.annotations.Select;
import java.util.List;
public interface ChannelPictureMapper extends BaseMapper<ChannelPicture> { public interface ChannelPictureMapper extends BaseMapper<ChannelPicture> {
@Select("select * from t_project p JOIN t_channel_picture cp JOIN t_project_mtm_camera pmc on p.id = pmc.project_id AND cp.channel_code = pmc.channel_code")
List<ChannelPictureDto> selectByProject();
} }