|
@@ -372,7 +372,7 @@ public class DatabaseInitializer implements CommandLineRunner {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
try {
|
|
try {
|
|
|
- jdbcTemplate.execute("ALTER TABLE users ADD COLUMN teacher_status VARCHAR(20) DEFAULT 'pending' COMMENT '成长规划师审核状态'");
|
|
|
|
|
|
|
+ jdbcTemplate.execute("ALTER TABLE users ADD COLUMN teacher_status VARCHAR(20) DEFAULT NULL COMMENT '成长规划师审核状态'");
|
|
|
log.info("已添加teacher_status列到users表");
|
|
log.info("已添加teacher_status列到users表");
|
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
|
// 列已存在,忽略错误
|
|
// 列已存在,忽略错误
|
|
@@ -3092,6 +3092,15 @@ insertSysConfigSeed("gift_membership_pay_price", "198000", "送会员商品达
|
|
|
// 迁移381: 创建 activity_poster_templates 表 + 初始化 3 套默认海报模板(Web 管理端定义 → 小程序端海报模板选择)
|
|
// 迁移381: 创建 activity_poster_templates 表 + 初始化 3 套默认海报模板(Web 管理端定义 → 小程序端海报模板选择)
|
|
|
createActivityPosterTemplatesTable();
|
|
createActivityPosterTemplatesTable();
|
|
|
|
|
|
|
|
|
|
+ // 迁移385: 活动报名添加驳回原因列(审核中心详情页驳回时写入)
|
|
|
|
|
+ addActivityRegistrationRejectReasonColumn();
|
|
|
|
|
+
|
|
|
|
|
+ // 迁移386: 清理规划师占位假数据(teacher_status='pending' 且 role<>'teacher'),默认值改 NULL
|
|
|
|
|
+ cleanPlannerPlaceholderData();
|
|
|
|
|
+
|
|
|
|
|
+ // 迁移387: 下线独立“服务角色申请审核”菜单(申请按角色分流合并进审核中心)
|
|
|
|
|
+ hideServiceRoleApplicationMenu();
|
|
|
|
|
+
|
|
|
// 迁移382: health_status 添加 signature 列(用户手签名,base64 PNG data URL,用于问卷回答确认)
|
|
// 迁移382: health_status 添加 signature 列(用户手签名,base64 PNG data URL,用于问卷回答确认)
|
|
|
ensureColumn("health_status", "signature", "MEDIUMTEXT DEFAULT NULL COMMENT '用户手签名(base64 PNG data URL),确认问卷回答准确性'");
|
|
ensureColumn("health_status", "signature", "MEDIUMTEXT DEFAULT NULL COMMENT '用户手签名(base64 PNG data URL),确认问卷回答准确性'");
|
|
|
|
|
|
|
@@ -9631,7 +9640,6 @@ sqls.add("INSERT IGNORE INTO health_norm_reference (dimension, gender, age_min,
|
|
|
// 审核中心(audit,归集各审核页:服务角色申请/活动审核/退款/提现)
|
|
// 审核中心(audit,归集各审核页:服务角色申请/活动审核/退款/提现)
|
|
|
{"", "reviewCenterGroup", "审核中心", "", "", "el-icon-s-check", "audit", "4"},
|
|
{"", "reviewCenterGroup", "审核中心", "", "", "el-icon-s-check", "audit", "4"},
|
|
|
{"reviewCenterGroup", "reviewCenter", "", "审核中心总览", "/review-center", "el-icon-s-check", "audit", "0"},
|
|
{"reviewCenterGroup", "reviewCenter", "", "审核中心总览", "/review-center", "el-icon-s-check", "audit", "0"},
|
|
|
- {"reviewCenterGroup", "serviceRoleApp", "", "服务角色申请审核", "/service-role-applications", "el-icon-s-check", "audit:service-role", "1"},
|
|
|
|
|
{"reviewCenterGroup", "activityReview", "", "活动审核", "/activity-review", "el-icon-document-checked", "audit:activity", "2"},
|
|
{"reviewCenterGroup", "activityReview", "", "活动审核", "/activity-review", "el-icon-document-checked", "audit:activity", "2"},
|
|
|
{"reviewCenterGroup", "pendingRefund", "", "待退款管理", "/pending-refund", "el-icon-warning", "audit:refund", "3"},
|
|
{"reviewCenterGroup", "pendingRefund", "", "待退款管理", "/pending-refund", "el-icon-warning", "audit:refund", "3"},
|
|
|
{"reviewCenterGroup", "earningWithdraw", "", "收益提现审核", "/family-earnings-withdraw", "el-icon-document-checked", "audit:withdraw", "4"},
|
|
{"reviewCenterGroup", "earningWithdraw", "", "收益提现审核", "/family-earnings-withdraw", "el-icon-document-checked", "audit:withdraw", "4"},
|
|
@@ -12587,4 +12595,41 @@ log.info("迁移298: 已为无 openid 的 child 账号补齐 family_members 记
|
|
|
log.warn("迁移381: 初始化默认海报模板失败: {}", e.getMessage());
|
|
log.warn("迁移381: 初始化默认海报模板失败: {}", e.getMessage());
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ // 迁移385: 活动报名添加驳回原因列(审核中心详情页驳回时写入)
|
|
|
|
|
+ private void addActivityRegistrationRejectReasonColumn() {
|
|
|
|
|
+ try {
|
|
|
|
|
+ if (!columnExists("activity_registrations", "reject_reason")) {
|
|
|
|
|
+ jdbcTemplate.execute("ALTER TABLE activity_registrations ADD COLUMN reject_reason VARCHAR(500) NULL COMMENT '驳回原因'");
|
|
|
|
|
+ log.info("迁移385: 已添加 activity_registrations.reject_reason 列");
|
|
|
|
|
+ }
|
|
|
|
|
+ } catch (Exception e) {
|
|
|
|
|
+ log.warn("迁移385: 添加活动报名驳回原因列失败: {}", e.getMessage());
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ // 迁移386: 历史 teacher_status='pending' 占位假数据清理,并把默认值改为 NULL
|
|
|
|
|
+ private void cleanPlannerPlaceholderData() {
|
|
|
|
|
+ try {
|
|
|
|
|
+ int cleaned = jdbcTemplate.update(
|
|
|
|
|
+ "UPDATE users SET teacher_status = NULL WHERE teacher_status = 'pending' AND (role IS NULL OR role <> 'teacher')");
|
|
|
|
|
+ jdbcTemplate.execute("ALTER TABLE users MODIFY COLUMN teacher_status VARCHAR(20) DEFAULT NULL COMMENT '成长规划师审核状态'");
|
|
|
|
|
+ log.info("迁移386: 已清理规划师占位数据 {} 行,teacher_status 默认值改为 NULL", cleaned);
|
|
|
|
|
+ } catch (Exception e) {
|
|
|
|
|
+ log.warn("迁移386: 清理规划师占位数据失败: {}", e.getMessage());
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ // 迁移387: 下线独立“服务角色申请审核”菜单,服务角色申请按角色分流合并进审核中心
|
|
|
|
|
+ private void hideServiceRoleApplicationMenu() {
|
|
|
|
|
+ try {
|
|
|
|
|
+ int updated = jdbcTemplate.update(
|
|
|
|
|
+ "UPDATE sys_menu SET visible = 0 WHERE path = '/service-role-applications'");
|
|
|
|
|
+ int removed = jdbcTemplate.update(
|
|
|
|
|
+ "DELETE FROM sys_role_menu WHERE menu_id IN (SELECT id FROM sys_menu WHERE path = '/service-role-applications')");
|
|
|
|
|
+ log.info("迁移387: 服务角色申请菜单已下线(菜单 {} 行,授权 {} 行)", updated, removed);
|
|
|
|
|
+ } catch (Exception e) {
|
|
|
|
|
+ log.warn("迁移387: 下线服务角色申请菜单失败: {}", e.getMessage());
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|