This commit is contained in:
2025-04-21 13:14:50 +08:00
parent f77777a055
commit 48c1e03945
8 changed files with 133 additions and 19 deletions

View File

@@ -1,6 +1,7 @@
package com.ping.study.controller.tx;
import com.ping.study.service.tx.LiveInfoService;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
@@ -21,4 +22,12 @@ public class LiveInfoController {
public String getLiveInfo(@PathVariable String cnlid) {
return liveInfoService.getLiveInfo(cnlid);
}
//定时执行更新直播链接
//定时任务 从北京时间凌晨到12点每过半个小时执行一次
@Scheduled(cron = "0 0/30 0-11 * * ?")
@RequestMapping("/live/refresh")
public String refreshLiveInfo() {
return liveInfoService.refreshLiveInfo();
}
}