傻逼的视频墙查看逻辑修改

焦作-mxbc-北起
LAPTOP-S9HJSOEB\昊天 2 years ago
parent 6a80d18cd7
commit 4228cb1c7b

@ -1,6 +1,7 @@
package com.zhehekeji.web.service;
import com.alibaba.excel.EasyExcel;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.zhehekeji.core.util.Assert;
@ -171,33 +172,23 @@ public class CameraService {
* @return
*/
public List<Camera> allCameras1(){
List<Camera> cameras = cameraMapper.selectByMap(new HashMap<>());
return cameras.stream().filter(camera -> {
int index = Integer.parseInt(camera.getName().substring(2, 4));
boolean b = index >= 1 && index <= 5;
return b;
}).collect(Collectors.toList());
Integer num = configProperties.getVideoStyleConfig().getVideoStyleRow() *configProperties.getVideoStyleConfig().getVideoStyleColumn();
Integer count = cameraMapper.selectCount(new QueryWrapper<Camera>());
List<Camera> cameras = cameraMapper.selectList(new QueryWrapper<Camera>().last("limit "+num));
return cameras;
}
public List<Camera> allCameras2(){
List<Camera> cameras = cameraMapper.selectByMap(new HashMap<>());
return cameras.stream().filter(camera -> {
int index = Integer.parseInt(camera.getName().substring(2, 4));
boolean b = index >= 6 && index <= 10;
return b;
}).collect(Collectors.toList());
Integer num = configProperties.getVideoStyleConfig().getVideoStyleRow() *configProperties.getVideoStyleConfig().getVideoStyleColumn();
List<Camera> cameras = cameraMapper.selectList(new QueryWrapper<Camera>().last("limit "+num +","+num));
return cameras;
}
public List<Camera> allCameras3(){
Integer num = configProperties.getVideoStyleConfig().getVideoStyleRow() *configProperties.getVideoStyleConfig().getVideoStyleColumn();
List<Camera> cameras = cameraMapper.selectList(new QueryWrapper<Camera>().last("limit "+num*2+","+num));
List<Camera> cameras = cameraMapper.selectByMap(new HashMap<>());
return cameras.stream().filter(camera -> {
int index = Integer.parseInt(camera.getName().substring(2, 4));
boolean b = index >= 11 && index <= 15;
return b;
}).collect(Collectors.toList());
return cameras;
}
/**

Loading…
Cancel
Save