家族-定时任务-钻石结算
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
package com.accompany.scheduler.task;
|
||||
|
||||
import com.accompany.business.service.clan.FamilyDiamondSettlementService;
|
||||
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 FamilyDiamondSettlementTask {
|
||||
|
||||
@Autowired
|
||||
private FamilyDiamondSettlementService service;
|
||||
|
||||
/**
|
||||
* 公会钻石结算
|
||||
* 周一凌晨0点
|
||||
* */
|
||||
@Scheduled(cron = "0 0 0 1,16 * *")
|
||||
public void familyDiamondSettlement() throws InterruptedException {
|
||||
long now = System.currentTimeMillis();
|
||||
log.info("familyGoldSettlement() start..........");
|
||||
|
||||
service.settlement(null);
|
||||
|
||||
long finish = System.currentTimeMillis();
|
||||
log.info("familyGoldSettlement() cost {}ms finish..........", finish-now);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user