Commit 7e157f3f authored by tianyiming's avatar tianyiming

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

parent 4cbcd28c
...@@ -31,27 +31,13 @@ public class SupervisionVideoServiceImpl extends ServiceImpl<SupervisionVideoMap ...@@ -31,27 +31,13 @@ public class SupervisionVideoServiceImpl extends ServiceImpl<SupervisionVideoMap
private IVideoService videoService; private IVideoService videoService;
@Override @Override
public List<List<AlamVideoVO>> queryVideoList(String bizOrgCode) { public List<AlamVideoVO> queryVideoList(String bizOrgCode) {
List<List<AlamVideoVO>> resList = new ArrayList<>();
List<AlamVideoVO> list = supervisionVideoMapper.getVideoByCompany(bizOrgCode); List<AlamVideoVO> list = supervisionVideoMapper.getVideoByCompany(bizOrgCode);
list.forEach(action -> { list.forEach(action -> {
action.setVedioFormat(vedioFormat); action.setVedioFormat(vedioFormat);
action.setUrl(videoService.getVideoUrl(action.getName(), action.getPresetPosition(), action.getUrl(), action.getCode())); action.setUrl(videoService.getVideoUrl(action.getName(), action.getPresetPosition(), action.getUrl(), action.getCode()));
}); });
List<AlamVideoVO> mapList = new ArrayList<>(); return list;
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;
} }
......
...@@ -9,8 +9,7 @@ ...@@ -9,8 +9,7 @@
wv.name as name, wv.name as name,
wv.url, wv.url,
wv.code, wv.code,
wv.preset_position as presetPosition, wv.preset_position as presetPosition
wv.name
from wl_supervision_video wsv left join wl_video wv on wsv.camera_id = wv.id from wl_supervision_video wsv left join wl_video wv on wsv.camera_id = wv.id
where wsv.biz_org_code like concat(#{bizOrgCode},'%'); where wsv.biz_org_code like concat(#{bizOrgCode},'%');
</select> </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