Commit fcae2139 authored by tangwei's avatar tangwei

修改bug

parent 0b9ff18c
...@@ -185,6 +185,13 @@ public interface EquipFeignClient { ...@@ -185,6 +185,13 @@ public interface EquipFeignClient {
*/ */
@RequestMapping(value = "/building/video/page", method = RequestMethod.GET) @RequestMapping(value = "/building/video/page", method = RequestMethod.GET)
ResponseModel<Page<Map<String, Object>>> getVideo( @RequestParam long current, @RequestParam long size, @RequestParam Long buildingId); ResponseModel<Page<Map<String, Object>>> getVideo( @RequestParam long current, @RequestParam long size, @RequestParam Long buildingId);
@RequestMapping(value = "/building/video/page", method = RequestMethod.GET)
ResponseModel<Page<Map<String, Object>>> getVideopag( @RequestParam String current,
@RequestParam String size,
@RequestParam String buildingId,
@RequestParam String code,
@RequestParam String equipmentName
);
/** /**
* *
...@@ -203,6 +210,12 @@ public interface EquipFeignClient { ...@@ -203,6 +210,12 @@ public interface EquipFeignClient {
@RequestParam String name, @RequestParam String name,
@RequestParam String typeCode); @RequestParam String typeCode);
@RequestMapping(value = "/building/video/page", method = RequestMethod.GET)
ResponseModel<Page<Map<String, Object>>> getVideoList( @RequestParam(value = "viewId") Long viewId,
@RequestParam(value = "videoName" ,required =false) String videoName,
@RequestParam(value = "videoCode" ,required =false) String videoCode,
@RequestParam(value = "current") int current,
@RequestParam(value = "size") int size);
/** /**
......
...@@ -300,6 +300,33 @@ public class CommandController extends BaseController { ...@@ -300,6 +300,33 @@ public class CommandController extends BaseController {
@TycloudOperation( needAuth = true,ApiLevel = UserType.AGENCY)
@RequestMapping(value = "/video/page", method = RequestMethod.GET)
@ApiOperation(httpMethod = "GET", value = "分页获取视频", notes = "分页获取视频")
public ResponseModel<Object> getVideopage(String current,
String size,
String equipmentName,
String code,
String buildingId
)throws Exception {
ResponseModel<Page<Map<String, Object>>> data= equipFeignClient.getVideopag(current,size,buildingId,code,equipmentName);
Page<Map<String, Object>> pag= data!=null?data.getResult():null;
List<Map<String, Object>> records =pag!=null?pag.getRecords():null;
if(records!=null&&records.size()>0){
for (Map<String, Object> record : records) {
ResponseModel<String> da=videoFeignClient.videoUrlByIndexCode(record.get("code")+"");
String url= da!=null?da.getResult().substring(da.getResult().indexOf("openUrl")):null;
record.put("url",url);
}
pag.setRecords(records);
}
return ResponseHelper.buildResponse(pag);
}
/** /**
* 水源列表分页查询 * 水源列表分页查询
* *
......
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