家族-定时任务-钻石每日余额

This commit is contained in:
khalil
2024-05-21 21:54:10 +08:00
parent 351cb2de93
commit c680e8da7c
15 changed files with 179 additions and 241 deletions

View File

@@ -0,0 +1,29 @@
package com.accompany.scheduler.task.family;
import com.accompany.business.service.family.FamilyMemberGoldRemainDayRecordService;
import lombok.SneakyThrows;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
@Slf4j
@Component
public class FamilySettlementTask {
@Autowired
private FamilyMemberGoldRemainDayRecordService service;
@SneakyThrows
@Scheduled(cron = "0 0 0 ? * *")
public void dayStatistic(){
long now = System.currentTimeMillis();
log.info("FamilySettlement() start..........");
service.dayStatistic(null);
long finish = System.currentTimeMillis();
log.info("FamilySettlement() cost {}ms finish..........", finish-now);
}
}