From 28eb26d68f7a2a4e6b316c3ea9f511aa143db66e Mon Sep 17 00:00:00 2001
From: KKSU <15274802129@163.com>
Date: Mon, 30 Sep 2024 16:57:18 +0800
Subject: [PATCH] 55测试环境
---
src/main/java/com/xcong/excoin/quartz/job/ZhiyarRewardJob.java | 13 +++++++++----
1 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/src/main/java/com/xcong/excoin/quartz/job/ZhiyarRewardJob.java b/src/main/java/com/xcong/excoin/quartz/job/ZhiyarRewardJob.java
index e9c4a46..ab84432 100644
--- a/src/main/java/com/xcong/excoin/quartz/job/ZhiyarRewardJob.java
+++ b/src/main/java/com/xcong/excoin/quartz/job/ZhiyarRewardJob.java
@@ -1,7 +1,8 @@
package com.xcong.excoin.quartz.job;
-import com.xcong.excoin.modules.coin.service.CoinService;
+import com.xcong.excoin.modules.coin.service.ZhiyaService;
import lombok.extern.slf4j.Slf4j;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
@@ -12,20 +13,24 @@
*/
@Slf4j
@Component
+@ConditionalOnProperty(prefix = "app", name = "other-job", havingValue = "true")
public class ZhiyarRewardJob {
@Resource
- private CoinService coinService;
+ private ZhiyaService zhiyaService;
/**
* 质押奖励计算
*/
- @Scheduled(cron = "0 0/1 * * * ? ")
+// @Scheduled(cron = "0 * * * * ? ")
+ @Scheduled(cron = "0 0 0 * * ? ")
public void updateDoingPrice() {
log.info("#质押奖励计算#");
try {
- coinService.grantZhiyaAmount();
+ //静态算力
+ zhiyaService.grantZhiyaAmount();
+ //todo -- 动态算力计算
} catch (Exception e) {
log.error("#质押奖励计算错误#", e);
}
--
Gitblit v1.9.1