工地接口优化

This commit is contained in:
wuweida 2022-06-23 15:31:02 +08:00
parent 5a401ffd80
commit 17199c1573
3 changed files with 41 additions and 0 deletions

View File

@ -67,6 +67,17 @@ public class Controller {
return success; return success;
} }
/**
*
* @return
*/
@GetMapping("camera")
public Result camera(){
List<PictureDto> pictureDtos = channelPictureMapper.selectByPicture();
Result success = Result.success(pictureDtos);
return success;
}
/** /**
* 景区人流识别 * 景区人流识别
* @return * @return

View File

@ -0,0 +1,26 @@
package com.hisense.monitormanage.dto;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import java.util.Date;
@Data
public class PictureDto {
private String ssqh;
private String xmmc;
private String xmdz;
private String channelCode;
private String name;
private String longitude;
private String latitude;
private String pic;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
private Date captureTime;
}

View File

@ -2,6 +2,7 @@ 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.dto.ChannelPictureDto;
import com.hisense.monitormanage.dto.PictureDto;
import com.hisense.monitormanage.entity.ChannelPicture; import com.hisense.monitormanage.entity.ChannelPicture;
import org.apache.ibatis.annotations.Select; import org.apache.ibatis.annotations.Select;
@ -12,4 +13,7 @@ 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") @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(); List<ChannelPictureDto> selectByProject();
@Select("select * from t_project p JOIN t_camera cp JOIN t_project_mtm_camera pmc on p.id = pmc.project_id AND cp.code = pmc.channel_code")
List<PictureDto> selectByPicture();
} }