视频token失效重试

This commit is contained in:
huangweixiong 2022-08-26 17:56:13 +08:00
parent 12861d1c24
commit 73b02e3ce6
2 changed files with 17 additions and 1 deletions

View File

@ -9,6 +9,7 @@ import io.renren.modules.gateway.dao.ApiCountHistoryDao;
import io.renren.modules.gateway.entity.ApiCountHistoryEntity; import io.renren.modules.gateway.entity.ApiCountHistoryEntity;
import io.renren.modules.gateway.service.MonitorServiceV2; import io.renren.modules.gateway.service.MonitorServiceV2;
import io.renren.modules.monitor.entity.Result; import io.renren.modules.monitor.entity.Result;
import io.renren.modules.monitor.service.MonitorService;
import io.renren.modules.notice.dto.SysNoticeDTO; import io.renren.modules.notice.dto.SysNoticeDTO;
import io.renren.modules.notice.service.impl.SysNoticeServiceImpl; import io.renren.modules.notice.service.impl.SysNoticeServiceImpl;
import io.renren.modules.resource.dao.AttrDao; import io.renren.modules.resource.dao.AttrDao;
@ -80,6 +81,8 @@ public class MonitorControllerV2 {
@Autowired @Autowired
private SysNoticeServiceImpl sysNoticeService; private SysNoticeServiceImpl sysNoticeService;
@Autowired
private MonitorService monitorService;
public List queryMetricCount(String queryFormat, Long start, Long end, String metricElement, int limit) throws InterruptedException, ExecutionException, TimeoutException { public List queryMetricCount(String queryFormat, Long start, Long end, String metricElement, int limit) throws InterruptedException, ExecutionException, TimeoutException {
String url = gatewayDomain + "/juapi/metrics/api/v1/query?query={query}&time={time}"; String url = gatewayDomain + "/juapi/metrics/api/v1/query?query={query}&time={time}";
@ -332,11 +335,20 @@ public class MonitorControllerV2 {
} }
@GetMapping("/sendMsg") @GetMapping("/sendMsg")
@ApiOperation("查询总api调用总量")
public void sendMsg(){ public void sendMsg(){
SysNoticeDTO sysNoticeDTO = new SysNoticeDTO(); SysNoticeDTO sysNoticeDTO = new SysNoticeDTO();
sysNoticeDTO.setTitle("请审批yyyy的流程申请"); sysNoticeDTO.setTitle("请审批yyyy的流程申请");
sysNoticeService.sendToYaweiUser(sysNoticeDTO, Lists.newArrayList(1513432847327199233L)); sysNoticeService.sendToYaweiUser(sysNoticeDTO, Lists.newArrayList(1513432847327199233L));
} }
@GetMapping("/expireVideoToken")
public void expireVideoToken(){
monitorService.expireToken();
}
@GetMapping("/getVideoToken")
public String getVideoToken(String code) throws IOException {
return monitorService.fileCode(code);
}
} }

View File

@ -1539,6 +1539,10 @@ public class MonitorService {
} }
return childs; return childs;
} }
public void expireToken(){
token = "expire";
}
} }