| | |
| | | import cc.mrbird.febs.mall.entity.MallMoneyFlow; |
| | | 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; |
| | | import cc.mrbird.febs.mall.service.*; |
| | | import cc.mrbird.febs.mall.service.impl.CommonService; |
| | | import cn.hutool.core.collection.CollUtil; |
| | | import cn.hutool.core.date.DateTime; |
| | |
| | | public class ProfitJob { |
| | | |
| | | @Autowired |
| | | private IMemberProfitService memberProfitService; |
| | | @Autowired |
| | | private IAgentService agentService; |
| | | |
| | | private CJService cjService; |
| | | /** |
| | | * 代理分红 |
| | | * 十分钟开奖一次 |
| | | * 生成一条开奖记录(只生成编号) |
| | | * 十分钟延迟的消息队列去开奖(产生一个中奖号码) |
| | | */ |
| | | // @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 1 * * ?") |
| | | // public void thankfulJob() { |
| | | // memberProfitService.thankfulProfit(null); |
| | | // } |
| | | |
| | | /** |
| | | * 代理商补贴 TODO 需要去掉注释 |
| | | */ |
| | | @Scheduled(cron = "0 0 1 * * ?") |
| | | public void agentPerkJob() { |
| | | memberProfitService.agentPerkJob(null); |
| | | @Scheduled(cron = "0 0/10 * * * ? ") |
| | | public void createKjRecord() { |
| | | cjService.createKjRecord(); |
| | | } |
| | | |
| | | /** |
| | | * 线下服务中心补贴 |
| | | */ |
| | | @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 0 * * ?") |
| | | // public void staticProfitJob() { |
| | | // memberProfitService.staticProfit(null); |
| | | // } |
| | | |
| | | /** |
| | | * 排名奖 每月1号 |
| | | */ |
| | | // @Scheduled(cron = "0 30 0 1 * ?") |
| | | // public void rankJob() { |
| | | // memberProfitService.rankProfit(); |
| | | // } |
| | | |
| | | /** |
| | | * 积分池,所有消费拿出10%放到积分池,然后按1%每天释放加权平分 |
| | | */ |
| | | // @Scheduled(cron = "0 0 2 * * ?") |
| | | // @Scheduled(cron = "0 0/5 * * * ? ") |
| | | // public void scorePool() { |
| | | // memberProfitService.scorePool(); |
| | | // } |
| | | } |