|
|
@@ -11270,6 +11270,18 @@ log.info("迁移298: 已为无 openid 的 child 账号补齐 family_members 记
|
|
|
log.info("迁移342: octopus_key_person.referrer_id 列已添加");
|
|
|
ensureColumn("octopus_key_person", "system_user_id", "BIGINT DEFAULT NULL COMMENT '匹配到的系统用户ID(如有)'");
|
|
|
log.info("迁移342: octopus_key_person.system_user_id 列已添加");
|
|
|
+
|
|
|
+ try {
|
|
|
+ Integer reportCount = jdbcTemplate.queryForObject(
|
|
|
+ "SELECT COUNT(*) FROM admin_task_templates WHERE title = 'REPORT_UPLOAD' AND onboarding_sequence IS NOT NULL", Integer.class);
|
|
|
+ if (reportCount == null || reportCount == 0) {
|
|
|
+ jdbcTemplate.execute("INSERT INTO admin_task_templates (title, description, points, category, need_review, is_active, task_type, frequency, onboarding_sequence, created_at, updated_at) VALUES " +
|
|
|
+ "('REPORT_UPLOAD', '完成首次报告上传', 300, '成长', 0, 1, 'onetime', 'none', 8, NOW(), NOW())");
|
|
|
+ log.info("迁移343: 已插入完成首次报告上传新人引导任务模板");
|
|
|
+ }
|
|
|
+ } catch (Exception e) {
|
|
|
+ log.warn("迁移343: 插入完成首次报告上传任务模板失败或已存在: {}", e.getMessage());
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
/**
|