From d4c0bf0a7cf69d58f87b07031aa6ba1ecfaa012b Mon Sep 17 00:00:00 2001
From: KKSU <15274802129@163.com>
Date: Wed, 22 May 2024 10:41:34 +0800
Subject: [PATCH] 增加支付宝收款码
---
src/main/java/cc/mrbird/febs/mall/quartz/ProfitJob.java | 178 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-
1 files changed, 174 insertions(+), 4 deletions(-)
diff --git a/src/main/java/cc/mrbird/febs/mall/quartz/ProfitJob.java b/src/main/java/cc/mrbird/febs/mall/quartz/ProfitJob.java
index a34ab2a..50fa5ba 100644
--- a/src/main/java/cc/mrbird/febs/mall/quartz/ProfitJob.java
+++ b/src/main/java/cc/mrbird/febs/mall/quartz/ProfitJob.java
@@ -1,12 +1,19 @@
package cc.mrbird.febs.mall.quartz;
import cc.mrbird.febs.common.enumerates.AgentLevelEnum;
+import cc.mrbird.febs.common.enumerates.DataDictionaryEnum;
import cc.mrbird.febs.common.enumerates.MoneyFlowTypeEnum;
+import cc.mrbird.febs.common.utils.AppContants;
import cc.mrbird.febs.common.utils.MallUtils;
+import cc.mrbird.febs.mall.chain.ChainEnum;
+import cc.mrbird.febs.mall.chain.ChainService;
+import cc.mrbird.febs.mall.entity.DataDictionaryCustom;
import cc.mrbird.febs.mall.entity.MallMember;
import cc.mrbird.febs.mall.entity.MallMoneyFlow;
+import cc.mrbird.febs.mall.mapper.DataDictionaryCustomMapper;
import cc.mrbird.febs.mall.mapper.MallMemberMapper;
import cc.mrbird.febs.mall.mapper.MallMoneyFlowMapper;
+import cc.mrbird.febs.mall.service.IAgentService;
import cc.mrbird.febs.mall.service.IApiMallMemberService;
import cc.mrbird.febs.mall.service.IApiMallMemberWalletService;
import cc.mrbird.febs.mall.service.IMemberProfitService;
@@ -14,6 +21,7 @@
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.date.DateTime;
import cn.hutool.core.date.DateUtil;
+import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
@@ -36,6 +44,12 @@
@Autowired
private IMemberProfitService memberProfitService;
+ @Autowired
+ private IAgentService agentService;
+ @Autowired
+ private DataDictionaryCustomMapper dataDictionaryCustomMapper;
+ @Autowired
+ private CommonService commonService;
/**
* 代理分红
@@ -50,14 +64,170 @@
// memberProfitService.storeAndDirectorProfit(null);
// }
+// /**
+// * 线下服务中心补贴
+// */
+// @Scheduled(cron = "0 0 1 * * ?")
+// public void thankfulJob() {
+// memberProfitService.thankfulProfit(null);
+// }
+
+// /**
+// * 代理商补贴 TODO 需要去掉注释
+// */
+// @Scheduled(cron = "0 0 1 * * ?")
+// public void agentPerkJob() {
+// memberProfitService.agentPerkJob(null);
+// }
+//
+// /**
+// * 线下服务中心补贴
+// */
+// @Scheduled(cron = "0 0 1 * * ?")
+// public void offLinePerkJob() {
+// memberProfitService.offLinePerkJob(null);
+// }
+//
+// /**
+// * 平级奖励补贴
+// */
+// @Scheduled(cron = "0 0 1 * * ?")
+// public void teamEqualsPerkJob() {
+// memberProfitService.teamEqualsPerkJob(null);
+// }
+//
+// /**
+// * 补贴消息--重试
+// * 一个小时运行一次
+// */
+// @Scheduled(cron = "0 0/5 * * * ?")
+// public void mqPerkRetryJob() {
+// memberProfitService.mqPerkRetryJob();
+// }
+// /**
+// * 联创、合伙人的每日绿色凭证释放
+// */
+// @Scheduled(cron = "0 0 1 * * ?")
+// public void scoreRecordReleaseJob() {
+// memberProfitService.scoreRecordReleaseJob();
+// }
+//
+// /**
+// * 业绩产生凭证
+// */
+// @Scheduled(cron = "0 0 1 * * ?")
+// public void achieveReleaseJob() {
+// memberProfitService.achieveReleaseJob();
+// }
+//
+// /**
+// * 代理星级补贴
+// */
+// @Scheduled(cron = "0 0 0 * * ?")
+// public void perkAgentAchieveJob() {
+// agentService.perkAgent();
+// }
+
/**
- * 线下服务中心补贴
+ * 更新代币价格
*/
- @Scheduled(cron = "0 0 1 * * ?")
- public void thankfulJob() {
- memberProfitService.thankfulProfit(null);
+ @Scheduled(cron = "0 0/1 * * * ? ")
+ public void gfaPrice() {
+ /**
+ * 定时器循环计算每个时间跨度内增加的滑点数量
+ */
+ log.info("更新代币价格");
+ //获取滑点钱包的余额
+ BigDecimal coinPrice = ChainService.getInstance(ChainEnum.BSC_GFA.name()).getPrice("0x1Ea392645f816BF15f1Fc87728eA010585bAAE7D").setScale(8,BigDecimal.ROUND_DOWN);
+ //获取上一时刻的数据
+ //更新价格
+ commonService.updateDataDic(
+ DataDictionaryEnum.FCM_PRICE.getType(),
+ DataDictionaryEnum.FCM_PRICE.getCode(),
+ coinPrice.toString());
}
+ /**
+ * 用户预约完成之后,根据产品周期,将用户买单变成买单 todo 0411 停止
+ */
+ @Scheduled(cron = "0 0 2 * * ?")
+ public void BuyToSell() {
+// agentService.BuyToSell();
+ agentService.BuyToSellV2();
+ }
+
+ /**
+ * 用户预约完成之后,根据产品周期,将用户买单变成买单
+ */
+ @Scheduled(cron = "0 0 3 * * ?")
+ public void memberLevelDown() {
+ agentService.memberLevelDown();
+ }
+
+
+ /**
+ * 用户等级升级
+ */
+ @Scheduled(cron = "0 0 0 * * ?")
+ public void memberLevelUp() {
+ agentService.memberLevelUp();
+ }
+
+ /**
+ * 买单
+ * 看是否是开始显示订单的时间段,超出结束时间的买单,全部超时失败
+ */
+ @Scheduled(cron = "0 0/2 * * * ? ")
+ public void timeGetOrderBuy() {
+ agentService.timeGetOrderBuy();
+ }
+
+ /**
+ * 买单
+ * 看是否是开始显示订单的时间段,超出结束时间的买单,全部超时返还令牌
+ */
+// @Scheduled(cron = "0 0/2 * * * ? ")
+// public void timeGetOrderBuyCancel() {
+// agentService.timeGetOrderBuyCancel();
+// }
+
+
+ /**
+ * 直推奖励
+ * 从冻结到可用 todo 0411 停止
+ */
+ @Scheduled(cron = "0 0 0/2 * * ? ")
+ public void basicMemberPerk() {
+ agentService.basicMemberPerk();
+ }
+
+ /**
+ * 团队奖励 todo 0411 停止
+ */
+ @Scheduled(cron = "0 0 0/2 * * ? ")
+ public void teamMemberPerk() {
+ agentService.teamMemberPerk();
+ }
+
+ /**
+ * 平级奖励 todo 0411 停止
+ */
+ @Scheduled(cron = "0 0 0/2 * * ? ")
+ public void equalsMemberPerk() {
+ agentService.equalsMemberPerk();
+ }
+
+// /**
+// * 卖单
+// * 看是否是开始显示订单的时间段,超出结束时间的卖单,全部超时失败
+// */
+// @Scheduled(cron = "0 0/30 * * * ? ")
+// public void timeGetOrderSell() {
+// agentService.timeGetOrderSell();
+// }
+
+
+
/**
* 静态分红
--
Gitblit v1.9.1