Showing
1 changed file
with
6 additions
and
0 deletions
| @@ -117,6 +117,8 @@ public class RoomOperationServiceImpl implements RoomOperationSerivice { | @@ -117,6 +117,8 @@ public class RoomOperationServiceImpl implements RoomOperationSerivice { | ||
| 117 | 117 | ||
| 118 | @Override | 118 | @Override |
| 119 | public ResultBean blockStatus(BlockParam blockParam) { | 119 | public ResultBean blockStatus(BlockParam blockParam) { |
| 120 | + Long start = System.currentTimeMillis(); | ||
| 121 | + | ||
| 120 | LiveMonitorRoom liveMonitorRoom = liveMonitorRoomMapper.selectById(blockParam.getRoomId()); | 122 | LiveMonitorRoom liveMonitorRoom = liveMonitorRoomMapper.selectById(blockParam.getRoomId()); |
| 121 | if (ObjectUtil.isNull(liveMonitorRoom)){ | 123 | if (ObjectUtil.isNull(liveMonitorRoom)){ |
| 122 | return ResultBean.error("审片间不存在"); | 124 | return ResultBean.error("审片间不存在"); |
| @@ -129,6 +131,8 @@ public class RoomOperationServiceImpl implements RoomOperationSerivice { | @@ -129,6 +131,8 @@ public class RoomOperationServiceImpl implements RoomOperationSerivice { | ||
| 129 | if (CollectionUtils.isEmpty(streamTasks)){ | 131 | if (CollectionUtils.isEmpty(streamTasks)){ |
| 130 | return ResultBean.error("当前审片间没有播放任务"); | 132 | return ResultBean.error("当前审片间没有播放任务"); |
| 131 | } | 133 | } |
| 134 | + | ||
| 135 | + log.info("-->审片间屏蔽前置逻辑耗时:{}ms",System.currentTimeMillis()-start); | ||
| 132 | streamTasks.forEach(streamTask -> { | 136 | streamTasks.forEach(streamTask -> { |
| 133 | //调用屏蔽接口 | 137 | //调用屏蔽接口 |
| 134 | Map<String, Object> paramsMap = new HashMap<>(); | 138 | Map<String, Object> paramsMap = new HashMap<>(); |
| @@ -136,11 +140,13 @@ public class RoomOperationServiceImpl implements RoomOperationSerivice { | @@ -136,11 +140,13 @@ public class RoomOperationServiceImpl implements RoomOperationSerivice { | ||
| 136 | paramsMap.put("blockStatus", blockParam.getBlockStatus()); | 140 | paramsMap.put("blockStatus", blockParam.getBlockStatus()); |
| 137 | HttpResponse execute = null; | 141 | HttpResponse execute = null; |
| 138 | try { | 142 | try { |
| 143 | + long tag1 = System.currentTimeMillis(); | ||
| 139 | execute = HttpRequest.put(blockStatusUrl) | 144 | execute = HttpRequest.put(blockStatusUrl) |
| 140 | .header("Content-Type", "application/json") | 145 | .header("Content-Type", "application/json") |
| 141 | .body(JSONUtils.obj2json(paramsMap)).timeout(30000).execute(); | 146 | .body(JSONUtils.obj2json(paramsMap)).timeout(30000).execute(); |
| 142 | if (execute.isOk()) { | 147 | if (execute.isOk()) { |
| 143 | log.info("-->请求转码系统屏蔽/恢复接口,url:{},paramsMap:{}",blockStatusUrl,paramsMap); | 148 | log.info("-->请求转码系统屏蔽/恢复接口,url:{},paramsMap:{}",blockStatusUrl,paramsMap); |
| 149 | + log.info("请求转码系统屏蔽/恢复接口,请求耗时:{}ms",System.currentTimeMillis()-tag1); | ||
| 144 | String body = execute.body(); | 150 | String body = execute.body(); |
| 145 | ResponseData response = JSONUtils.jsonToObject(body, new TypeReference<ResponseData>() { | 151 | ResponseData response = JSONUtils.jsonToObject(body, new TypeReference<ResponseData>() { |
| 146 | }); | 152 | }); |
-
Please register or login to post a comment