This commit is contained in:
mmm8955405 2024-03-19 10:11:35 +08:00
parent 170264a09f
commit 087016bc46
2 changed files with 17 additions and 17 deletions

View File

@ -152,25 +152,25 @@ public class GetFutDailyController {
@GetMapping("/getDateNow")
public Object getDateNow() {
// LocalDate d = LocalDate.now();
// var from = select(ContractInfoMapper.selectList)
// .from(ContractInfoDynamicSqlSupport.contractInfo)
// .where(ContractInfoDynamicSqlSupport.contractInfo.delist_date, isGreaterThan(d))
// //.and(ContractInfoDynamicSqlSupport.ts_code, )
// .build()
// .render(RenderingStrategies.MYBATIS3);
LocalDate d = LocalDate.now();
var from = select(ContractInfoMapper.selectList)
.from(select(ContractInfoMapper.selectList)
.from(ContractInfoDynamicSqlSupport.contractInfo)
.orderBy(ContractInfoDynamicSqlSupport.delist_date.descending())
.limit(20000),
"t1"
)
.groupBy(ContractInfoDynamicSqlSupport.fut_code)
.from(ContractInfoDynamicSqlSupport.contractInfo)
.where(ContractInfoDynamicSqlSupport.contractInfo.delist_date, isGreaterThan(d))
//.and(ContractInfoDynamicSqlSupport.ts_code, )
.build()
.render(RenderingStrategies.MYBATIS3);
// var from = select(ContractInfoMapper.selectList)
// .from(select(ContractInfoMapper.selectList)
// .from(ContractInfoDynamicSqlSupport.contractInfo)
// .orderBy(ContractInfoDynamicSqlSupport.delist_date.descending())
// .limit(20000),
// "t1"
// )
// .groupBy(ContractInfoDynamicSqlSupport.fut_code)
// .build()
// .render(RenderingStrategies.MYBATIS3);
List<ContractInfo> contractInfos = contractInfoMapper.selectMany(from);

View File

@ -11,12 +11,12 @@ public class FutDailyTime {
@Autowired GetFutDailyController getFutDailyController;
//@Scheduled(cron = "0 0/5 * * * ?") //5分钟
@Scheduled(cron = "0 0 02 * * ?") //每天早上2点
@Scheduled(cron = "0 30 15 * * ?") //每天中午3点半
public void getDateNow() throws Exception {
getFutDailyController.getDateNow();
}
@Scheduled(cron = "0 0 03 * * ?") //每天早上3点
@Scheduled(cron = "0 30 13 * * ?") //每天中午1点半
public void checkUser() throws Exception {
getFutDailyController.getDate();
}