查询摄像头标签接口优化
This commit is contained in:
parent
f61093b6d7
commit
85157456b8
|
@ -114,7 +114,7 @@ public class Controller {
|
|||
|
||||
@GetMapping("capture1")
|
||||
public Object capture1(){
|
||||
monitorService.screenShot1();
|
||||
monitorService.listChannelPlayStates();
|
||||
|
||||
return "finish capture";
|
||||
}
|
||||
|
@ -292,10 +292,12 @@ public class Controller {
|
|||
@ApiOperation("提供给其他项目分页查询摄像头接口")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "page",value = "页码",required = true,dataType = "Integer"),
|
||||
@ApiImplicitParam(name = "pageSize",value = "页码大小",required = true,dataType = "Integer")
|
||||
@ApiImplicitParam(name = "pageSize",value = "页码大小",required = true,dataType = "Integer"),
|
||||
@ApiImplicitParam(name = "labelCode",value = "标签号",required = false,dataType = "String")
|
||||
})
|
||||
public Result selectNLAll(Integer page,Integer pageSize){
|
||||
List<CameraChannelNLDto> selectNLAll = cameraChannelMapper.selectNLAll(page,pageSize);
|
||||
public Result selectNLAll(Integer page,Integer pageSize,String labelCode){
|
||||
List<CameraChannelNLDto> selectNLAll = cameraChannelMapper.selectNLAll(page,pageSize,labelCode);
|
||||
|
||||
Result success = Result.success(selectNLAll);
|
||||
return success;
|
||||
}
|
||||
|
|
|
@ -52,6 +52,6 @@ public interface CameraChannelMapper extends BaseMapper<CameraChannel> {
|
|||
@Param("gpsY1") Double gpsY1);
|
||||
|
||||
|
||||
List<CameraChannelNLDto> selectNLAll(@Param("page") Integer page,@Param("pageSize") Integer pageSize);
|
||||
List<CameraChannelNLDto> selectNLAll(@Param("page") Integer page,@Param("pageSize") Integer pageSize,@Param("labelCode") String labelCode);
|
||||
|
||||
}
|
||||
|
|
|
@ -791,7 +791,7 @@ public class MonitorService {
|
|||
//获取当前时间和前一天的UTC时间
|
||||
Map<String,Object> condition = new HashMap<>();
|
||||
ZonedDateTime endUTC = ZonedDateTime.now(ZoneOffset.UTC);
|
||||
ZonedDateTime startUTC = endUTC.minusDays(30);
|
||||
ZonedDateTime startUTC = endUTC.minusDays(60);
|
||||
DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPattern("yyyyMMdd'T'HHmmss'Z'");
|
||||
condition.put("checkStatus",0);
|
||||
condition.put("startTime",dateTimeFormatter.format(startUTC));
|
||||
|
|
|
@ -25,9 +25,14 @@
|
|||
</update>
|
||||
|
||||
<select id="selectNLAll" resultType="com.hisense.monitormanage.dto.CameraChannelNLDto">
|
||||
SELECT a.label_name,d.* from t_label a JOIN (select b.label_code,c.* from t_camera_channel c
|
||||
JOIN t_channel_mtm_label b on c.channel_code = b.channel_code where label_code != '') d
|
||||
SELECT a.label_name,d.* from t_label a RIGHT JOIN (select b.label_code,c.* from t_camera_channel c
|
||||
LEFT JOIN t_channel_mtm_label b on c.channel_code = b.channel_code) d
|
||||
on d.label_code = a.label_code
|
||||
<where>
|
||||
<if test="labelCode != null and labelCode != ''">
|
||||
d.label_code = #{labelCode}
|
||||
</if>
|
||||
</where>
|
||||
<bind name="page" value="(page-1)*pageSize"/>
|
||||
limit #{page},#{pageSize}
|
||||
</select>
|
||||
|
|
Loading…
Reference in New Issue