fix: 投资系统,茅台预约代码提交。

This commit is contained in:
tianyongbao
2024-12-07 16:43:13 +08:00
parent 2c18e66c77
commit e29fe34a59
53 changed files with 4713 additions and 1 deletions

View File

@@ -0,0 +1,81 @@
package com.ruoyi.task;
import com.ruoyi.invest.service.IMTService;
import com.ruoyi.invest.service.IUserService;
import lombok.RequiredArgsConstructor;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.annotation.Async;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;
/**
* i茅台定时任务
*/
@Configuration
@EnableScheduling
@RequiredArgsConstructor
public class CampusIMTTask {
private static final Logger logger = LoggerFactory.getLogger(CampusIMTTask.class);
private final IMTService imtService;
private final IUserService iUserService;
/**
* 110 批量修改用户随机预约的时间
*/
@Async
@Scheduled(cron = "0 10 1 ? * * ")
public void updateUserMinuteBatch() {
iUserService.updateUserMinuteBatch();
}
/**
* 11点期间每分钟执行一次批量获得旅行奖励
*/
@Async
@Scheduled(cron = "0 0/1 11 ? * *")
public void getTravelRewardBatch() {
imtService.getTravelRewardBatch();
}
/**
* 9点期间每分钟执行一次
*/
@Scheduled(cron = "0 0/1 9 ? * *")
public void reservationBatchTask() {
imtService.reservationBatch();
}
@Scheduled(cron = "0 10,55 7,8 ? * * ")
public void refresh() {
logger.info("「刷新数据」开始刷新版本号预约item门店shop列表 ");
try {
imtService.refreshAll();
} catch (Exception e) {
logger.info("「刷新数据执行报错」%s", e.getMessage());
}
}
/**
* 18.05分获取申购结果
*/
@Async
@Scheduled(cron = "0 5 18 ? * * ")
public void appointmentResults() {
imtService.appointmentResults();
}
}