跨年烟花活动-榜单结算

This commit is contained in:
2022-12-24 14:34:58 +08:00
parent 870b1914a1
commit e3fd255e5e
4 changed files with 45 additions and 10 deletions

View File

@@ -0,0 +1,23 @@
package com.accompany.scheduler.task.activity;
import com.accompany.business.service.activities.ActNewYearFireworkService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
import java.time.LocalDateTime;
import java.util.Date;
@Component
public class ActNewYearFireworkTask {
@Autowired
private ActNewYearFireworkService service;
@Scheduled(cron = "0 0 0 * * ?")
public void settlement(){
LocalDateTime now = LocalDateTime.now();
service.settlement(now);
}
}