xiaoyong931011
2022-02-25 89b7fb1d316cfce7eb98a27c8d668da493933f7f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
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 0 0 * * ? ")
    public void updateDoingPrice() {
        log.info("#质押奖励计算#");
        try {
            zhiyaService.grantZhiyaAmount();
        } catch (Exception e) {
            log.error("#质押奖励计算错误#", e);
        }
    }
}