init
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user