From 48bb23486bc018d13014d8acde4fb51ec3a78a36 Mon Sep 17 00:00:00 2001 From: xiaoyong931011 <15274802129@163.com> Date: Sat, 24 Sep 2022 11:27:59 +0800 Subject: [PATCH] Merge branch 'group_buy' of http://120.27.238.55:7000/r/xc-mall into group_buy --- src/main/java/cc/mrbird/febs/mall/quartz/ProfitJob.java | 19 +++++++++++++------ 1 files changed, 13 insertions(+), 6 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 aa97eb0..1f32cc1 100644 --- a/src/main/java/cc/mrbird/febs/mall/quartz/ProfitJob.java +++ b/src/main/java/cc/mrbird/febs/mall/quartz/ProfitJob.java @@ -17,6 +17,7 @@ import cn.hutool.core.util.StrUtil; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; import org.springframework.scheduling.annotation.Scheduled; import org.springframework.stereotype.Component; import org.springframework.transaction.annotation.Transactional; @@ -32,6 +33,7 @@ **/ @Slf4j @Component +@ConditionalOnProperty(prefix = "system", name = "job", havingValue = "true") public class ProfitJob { @Autowired @@ -40,32 +42,37 @@ /** * 代理分红 */ - @Scheduled(cron = "0 0 1 * * ?") + @Scheduled(cron = "0 30 0 * * ?") public void profitJob() { memberProfitService.agentProfit(null); + } + + @Scheduled(cron = "0 30 1 * * ?") + public void storeAndDirectorJob() { + memberProfitService.storeAndDirectorProfit(null); } /** * 感恩奖 */ - @Scheduled(cron = "0 0 2 * * ?") + @Scheduled(cron = "0 0 1 * * ?") public void thankfulJob() { - memberProfitService.thankfulProfit(); + memberProfitService.thankfulProfit(null); } /** * 静态分红 */ - @Scheduled(cron = "0 30 2 * * ?") + @Scheduled(cron = "0 0 0 * * ?") public void staticProfitJob() { - memberProfitService.staticProfit(); + memberProfitService.staticProfit(null); } /** * 排名奖 每月1号 */ - @Scheduled(cron = "0 0 3 1 * ?") + @Scheduled(cron = "0 30 0 1 * ?") public void rankJob() { memberProfitService.rankProfit(); } -- Gitblit v1.9.1