定时任务日志
This commit is contained in:
@@ -4,6 +4,7 @@ import com.czg.order.service.ShopOrderStatisticService;
|
|||||||
import com.czg.order.service.ShopProdStatisticService;
|
import com.czg.order.service.ShopProdStatisticService;
|
||||||
import com.czg.order.service.ShopTableOrderStatisticService;
|
import com.czg.order.service.ShopTableOrderStatisticService;
|
||||||
import jakarta.annotation.Resource;
|
import jakarta.annotation.Resource;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.scheduling.annotation.Scheduled;
|
import org.springframework.scheduling.annotation.Scheduled;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
@@ -11,6 +12,7 @@ import org.springframework.stereotype.Component;
|
|||||||
* @author Administrator
|
* @author Administrator
|
||||||
*/
|
*/
|
||||||
@Component
|
@Component
|
||||||
|
@Slf4j
|
||||||
public class StatisticTask {
|
public class StatisticTask {
|
||||||
@Resource
|
@Resource
|
||||||
private ShopTableOrderStatisticService shopTableOrderStatisticService;
|
private ShopTableOrderStatisticService shopTableOrderStatisticService;
|
||||||
@@ -21,6 +23,7 @@ public class StatisticTask {
|
|||||||
|
|
||||||
@Scheduled(cron = "0 0 9 * * ?")
|
@Scheduled(cron = "0 0 9 * * ?")
|
||||||
public void run() {
|
public void run() {
|
||||||
|
log.info("定时任务执行,开始统计数据");
|
||||||
shopOrderStatisticService.statistic();
|
shopOrderStatisticService.statistic();
|
||||||
shopProdStatisticService.statistic();
|
shopProdStatisticService.statistic();
|
||||||
shopTableOrderStatisticService.statistic();
|
shopTableOrderStatisticService.statistic();
|
||||||
|
|||||||
Reference in New Issue
Block a user