parent
4c393e1ac1
commit
c60bec460f
@ -0,0 +1,43 @@ |
|||||||
|
package com.hfkj.schedule; |
||||||
|
|
||||||
|
import com.hfkj.service.cornucopia.BsCornucopiaPoolService; |
||||||
|
import com.hfkj.service.partner.PartnerService; |
||||||
|
import org.springframework.scheduling.annotation.Scheduled; |
||||||
|
import org.springframework.stereotype.Component; |
||||||
|
|
||||||
|
import javax.annotation.Resource; |
||||||
|
|
||||||
|
/** |
||||||
|
* @ClassName LotterySchedule |
||||||
|
* @Author Sum1Dream |
||||||
|
* @Description 开奖定时任务 |
||||||
|
* @Date 2024/11/4 下午2:48 |
||||||
|
**/ |
||||||
|
@Component |
||||||
|
public class LotterySchedule { |
||||||
|
@Resource |
||||||
|
private PartnerService partnerService; |
||||||
|
|
||||||
|
@Resource |
||||||
|
private BsCornucopiaPoolService cornucopiaPoolService; |
||||||
|
|
||||||
|
@Scheduled(cron = "0 30 23 * * ?") // 每日23:30:00 执行一次
|
||||||
|
public void startCampaign() { |
||||||
|
try { |
||||||
|
partnerService.startCampaign(); |
||||||
|
|
||||||
|
} catch (Exception e) { |
||||||
|
System.out.println("统计失败!!!"); |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
@Scheduled(cron = "0 0 20 * * ?") // 每日20:00:00 执行一次
|
||||||
|
public void cornucopiaLottery() { |
||||||
|
try { |
||||||
|
cornucopiaPoolService.cornucopiaLottery(); |
||||||
|
|
||||||
|
} catch (Exception e) { |
||||||
|
System.out.println("统计失败!!!"); |
||||||
|
} |
||||||
|
} |
||||||
|
} |
Loading…
Reference in new issue