| | |
| | | import cc.mrbird.febs.mall.service.IApiMallMemberWalletService; |
| | | import cc.mrbird.febs.mall.service.IMemberProfitService; |
| | | import cc.mrbird.febs.mall.service.impl.CommonService; |
| | | import cc.mrbird.febs.mall.vo.AdminChatRedBagVo; |
| | | import cc.mrbird.febs.rabbit.producter.AgentProducer; |
| | | import cn.hutool.core.collection.CollUtil; |
| | | import cn.hutool.core.date.DateTime; |
| | |
| | | /** |
| | | * 代理分红 |
| | | */ |
| | | // @Scheduled(cron = "0 0/1 * * * ? ") |
| | | @Scheduled(cron = "0 0/1 * * * ? ") |
| | | @Scheduled(cron = "0/2 * * * * ? ") |
| | | // @Scheduled(cron = "0/30 * * * * ? ") |
| | | public void profitJob() { |
| | |
| | | } |
| | | |
| | | // @Scheduled(cron = "0/2 * * * * ? ") |
| | | // @Scheduled(cron = "0 0 0/1 * * ? ") |
| | | // public void robotNickNameJob() { |
| | | // List<ChatUser> chatUsers = chatUserMapper.selectListByIsRobot(1); |
| | | // if(CollUtil.isNotEmpty(chatUsers)){ |
| | | // for(ChatUser chatUser : chatUsers){ |
| | | // chatUserMapper.updateNicknameById(chatUser.getUserId(),randomName(RandomUtil.randomInt(1, 5))); |
| | | // } |
| | | // } |
| | | // } |
| | | |
| | | // @Scheduled(cron = "0/2 * * * * ? ") |
| | | @Scheduled(cron = "0 0 0/1 * * ? ") |
| | | public void robotNickNameJob() { |
| | | List<ChatUser> chatUsers = chatUserMapper.selectListByIsRobot(1); |
| | | if(CollUtil.isNotEmpty(chatUsers)){ |
| | | for(ChatUser chatUser : chatUsers){ |
| | | chatUserMapper.updateNicknameById(chatUser.getUserId(),randomName(RandomUtil.randomInt(1, 5))); |
| | | public void returnRedBagAmount() { |
| | | List<AdminChatRedBagVo> adminChatRedBagVos = chatUserMapper.selectByOverDueStatueAndTime(2, DateUtil.date()); |
| | | if(CollUtil.isNotEmpty(adminChatRedBagVos)){ |
| | | for(AdminChatRedBagVo adminChatRedBagVo : adminChatRedBagVos){ |
| | | chatUserMapper.updateOverdueStatusById(1,adminChatRedBagVo.getId()); |
| | | agentProducer.sendOverdueSendMsg(adminChatRedBagVo.getId()); |
| | | } |
| | | } |
| | | } |