家族-定时任务-钻石每日余额
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user