feat: 首次提交NBA项目

This commit is contained in:
2026-05-14 22:09:55 +08:00
parent 0adfe7d539
commit ddb78e29a3
47 changed files with 2843 additions and 103 deletions

View File

@@ -1,12 +1,11 @@
package com.ping.study.controller.tx;
import com.ping.study.service.UrlsService;
import com.ping.study.service.tx.LiveInfoService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
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;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
@RestController
@@ -22,13 +21,13 @@ public class LiveInfoController {
@GetMapping("/live/{cnlid}")
public String getLiveInfo(@PathVariable String cnlid) throws Exception {
log.info("执行查询直播cnlid: {}", cnlid);
log.info("执行查询直播id: {}", cnlid);
return liveInfoService.getLiveInfo(cnlid);
}
//定时执行更新直播链接
//定时任务 从北京时间凌晨到12点每过半个小时执行一次
@Scheduled(cron = "0 0/15 0-12 * * ?")
//定时任务 从北京时间凌晨到12:00点,每过5分钟执行一次
@Scheduled(cron = "0 0/10 0-12 * * ?")
@RequestMapping("/live/refresh")
public String refreshLiveInfo() throws Exception {
log.info("=========开始执行更新直播链接=========");