| | |
| | | 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; |
| | |
| | | **/ |
| | | @Slf4j |
| | | @Component |
| | | @ConditionalOnProperty(prefix = "system", name = "job", havingValue = "true") |
| | | public class ProfitJob { |
| | | |
| | | @Autowired |
| | |
| | | /** |
| | | * 代理分红 |
| | | */ |
| | | @Scheduled(cron = "0 0 1 * * ?") |
| | | @Scheduled(cron = "0 30 0 * * ?") |
| | | public void profitJob() { |
| | | memberProfitService.agentProfit(null); |
| | | } |
| | |
| | | /** |
| | | * 感恩奖 |
| | | */ |
| | | @Scheduled(cron = "0 30 3 * * ?") |
| | | @Scheduled(cron = "0 0 1 * * ?") |
| | | public void thankfulJob() { |
| | | memberProfitService.thankfulProfit(null); |
| | | } |
| | |
| | | /** |
| | | * 静态分红 |
| | | */ |
| | | @Scheduled(cron = "0 30 2 * * ?") |
| | | @Scheduled(cron = "0 0 0 * * ?") |
| | | public void staticProfitJob() { |
| | | memberProfitService.staticProfit(null); |
| | | } |
| | |
| | | /** |
| | | * 排名奖 每月1号 |
| | | */ |
| | | @Scheduled(cron = "0 0 3 1 * ?") |
| | | @Scheduled(cron = "0 30 0 1 * ?") |
| | | public void rankJob() { |
| | | memberProfitService.rankProfit(); |
| | | } |