Commit 7e157f3f authored by tianyiming's avatar tianyiming

修改监盘视频列表查询返回数据结构

parent 4cbcd28c
......@@ -31,27 +31,13 @@ public class SupervisionVideoServiceImpl extends ServiceImpl<SupervisionVideoMap
private IVideoService videoService;
@Override
public List<List<AlamVideoVO>> queryVideoList(String bizOrgCode) {
List<List<AlamVideoVO>> resList = new ArrayList<>();
public List<AlamVideoVO> queryVideoList(String bizOrgCode) {
List<AlamVideoVO> list = supervisionVideoMapper.getVideoByCompany(bizOrgCode);
list.forEach(action -> {
action.setVedioFormat(vedioFormat);
action.setUrl(videoService.getVideoUrl(action.getName(), action.getPresetPosition(), action.getUrl(), action.getCode()));
});
List<AlamVideoVO> mapList = new ArrayList<>();
for (int i = 0; i < list.size(); i++) {
if (list.size() > 1 && ((i+1) % 2) - 1 != 0 && i != 0) {
mapList.add(list.get(i));
resList.add(mapList);
mapList = new ArrayList<>();
} else {
mapList.add(list.get(i));
if (i == list.size() - 1) {
resList.add(mapList);
}
}
}
return resList;
return list;
}
......
......@@ -9,8 +9,7 @@
wv.name as name,
wv.url,
wv.code,
wv.preset_position as presetPosition,
wv.name
wv.preset_position as presetPosition
from wl_supervision_video wsv left join wl_video wv on wsv.camera_id = wv.id
where wsv.biz_org_code like concat(#{bizOrgCode},'%');
</select>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment