This commit is contained in:
litianxiang
2025-10-14 18:10:59 +08:00
parent 854847a6f4
commit 3b6a9882d2
9 changed files with 37 additions and 37 deletions

View File

@@ -164,7 +164,7 @@ public class MyTaskScheduler {
// 定时任务,每十五天执行一次
// @Scheduled(cron = "0 0 0 ? * MON")
// @Scheduled(cron = "0 0 0 */15 * ?")
@Scheduled(cron = "0 0 0 */15 * ?")
public void checkExpiry() {
// 检测正式用户是否快要过期
QueryWrapper<Account> qw = new QueryWrapper<>();
@@ -200,7 +200,7 @@ public class MyTaskScheduler {
}
}
}
// @Scheduled(cron = "0 0 9 * * ?")
@Scheduled(cron = "0 0 9 * * ?")
public void sendTrialOrderExcelToManagements() {
// 获取前一天日期
LocalDate yesterday = LocalDate.now().minusDays(1);
@@ -1310,11 +1310,11 @@ public class MyTaskScheduler {
public List<Long> getCollectionIdsByAccount(Long accountId) {
// 查询该用户的所有 collectionId
return sketchDataMapper.selectList(
new QueryWrapper<SketchData>()
.lambda()
.eq(SketchData::getAccountId, accountId) // 筛选用户
.select(SketchData::getCollectionId) // 只查询 collectionId
).stream()
new QueryWrapper<SketchData>()
.lambda()
.eq(SketchData::getAccountId, accountId) // 筛选用户
.select(SketchData::getCollectionId) // 只查询 collectionId
).stream()
.map(SketchData::getCollectionId)
.distinct() // 去重,确保 collectionId 唯一
.collect(Collectors.toList());