定时器 ,周期性的统计分析品牌维度

This commit is contained in:
spllzh
2025-09-21 16:53:07 +08:00
parent cd72a3680c
commit 004ba02996
26 changed files with 118 additions and 207 deletions

View File

@@ -134,18 +134,23 @@ public class CustomerProfileMockInsertDataScheduler {
public void generateDailyCustomerProfileData() {
try {
log.info("开始执行客户画像数据生成任务...");
// 生成昨天的数据
LocalDateTime yesterday = LocalDateTime.now().minusDays(1);
int count = generateCustomerProfileDataForDate(yesterday);
log.info("客户画像数据生成任务执行完成,生成日期:{},生成记录数:{}",
yesterday.format(DateTimeFormatter.ofPattern("yyyy-MM-dd")), count);
// 生成今天的数据
LocalDateTime today = LocalDateTime.now().minusDays(0);
int todayCount = generateCustomerProfileDataForDate(today);
// 生成昨天的数据
LocalDateTime yesterday = LocalDateTime.now().minusDays(1);
int count = generateCustomerProfileDataForDate(yesterday);
// 生成前天天的数据
LocalDateTime yesterday2 = LocalDateTime.now().minusDays(2);
int count2 = generateCustomerProfileDataForDate(yesterday2);
log.info("客户画像数据生成任务执行完成,生成日期:{},生成记录数:{}",
yesterday.format(DateTimeFormatter.ofPattern("yyyy-MM-dd")), count);
log.info("客户画像数据生成任务执行完成,生成日期:{},生成记录数:{}",
today.format(DateTimeFormatter.ofPattern("yyyy-MM-dd")), todayCount);
} catch (Exception e) {