package com.xcong.excoin.quartz.job; import com.xcong.excoin.modules.coin.service.ZhiyaService; import lombok.extern.slf4j.Slf4j; import org.springframework.scheduling.annotation.Scheduled; import org.springframework.stereotype.Component; import javax.annotation.Resource; /** * 质押 */ @Slf4j @Component public class ZhiyarRewardJob { @Resource private ZhiyaService zhiyaService; /** * 质押奖励计算 */ // @Scheduled(cron = "0 * * * * ? ") @Scheduled(cron = "0 0 0 * * ? ") public void updateDoingPrice() { log.info("#质押奖励计算#"); try { //静态算力 zhiyaService.grantZhiyaAmount(); //todo -- 动态算力计算 } catch (Exception e) { log.error("#质押奖励计算错误#", e); } } }