|
@@ -5894,12 +5894,12 @@ try {
|
|
|
"platform_fee_p BIGINT DEFAULT 0, " +
|
|
"platform_fee_p BIGINT DEFAULT 0, " +
|
|
|
"butler_amount_p BIGINT DEFAULT 0, " +
|
|
"butler_amount_p BIGINT DEFAULT 0, " +
|
|
|
"member_tier VARCHAR(10), " +
|
|
"member_tier VARCHAR(10), " +
|
|
|
- "year_month VARCHAR(7), " +
|
|
|
|
|
|
|
+ "`year_month` VARCHAR(7), " +
|
|
|
"remark VARCHAR(500), " +
|
|
"remark VARCHAR(500), " +
|
|
|
"created_at DATETIME DEFAULT CURRENT_TIMESTAMP, " +
|
|
"created_at DATETIME DEFAULT CURRENT_TIMESTAMP, " +
|
|
|
"INDEX idx_butler_id (butler_id), " +
|
|
"INDEX idx_butler_id (butler_id), " +
|
|
|
"INDEX idx_member_user_id (member_user_id), " +
|
|
"INDEX idx_member_user_id (member_user_id), " +
|
|
|
- "INDEX idx_year_month (year_month)" +
|
|
|
|
|
|
|
+ "INDEX idx_year_month (`year_month`)" +
|
|
|
") ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='管家服务记录'");
|
|
") ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='管家服务记录'");
|
|
|
log.info("已创建butler_service_records表");
|
|
log.info("已创建butler_service_records表");
|
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
@@ -5910,7 +5910,7 @@ try {
|
|
|
jdbcTemplate.execute("CREATE TABLE IF NOT EXISTS butler_commission_settlements (" +
|
|
jdbcTemplate.execute("CREATE TABLE IF NOT EXISTS butler_commission_settlements (" +
|
|
|
"id BIGINT AUTO_INCREMENT PRIMARY KEY, " +
|
|
"id BIGINT AUTO_INCREMENT PRIMARY KEY, " +
|
|
|
"butler_id BIGINT NOT NULL, " +
|
|
"butler_id BIGINT NOT NULL, " +
|
|
|
- "year_month VARCHAR(7) NOT NULL, " +
|
|
|
|
|
|
|
+ "`year_month` VARCHAR(7) NOT NULL, " +
|
|
|
"member_count INT DEFAULT 0, " +
|
|
"member_count INT DEFAULT 0, " +
|
|
|
"annual_base_amount_p BIGINT DEFAULT 0, " +
|
|
"annual_base_amount_p BIGINT DEFAULT 0, " +
|
|
|
"annual_butler_amount_p BIGINT DEFAULT 0, " +
|
|
"annual_butler_amount_p BIGINT DEFAULT 0, " +
|
|
@@ -5923,9 +5923,9 @@ try {
|
|
|
"settled_at DATETIME, " +
|
|
"settled_at DATETIME, " +
|
|
|
"settled_by BIGINT, " +
|
|
"settled_by BIGINT, " +
|
|
|
"created_at DATETIME DEFAULT CURRENT_TIMESTAMP, " +
|
|
"created_at DATETIME DEFAULT CURRENT_TIMESTAMP, " +
|
|
|
- "UNIQUE KEY uk_butler_month (butler_id, year_month), " +
|
|
|
|
|
|
|
+ "UNIQUE KEY uk_butler_month (butler_id, `year_month`), " +
|
|
|
"INDEX idx_status (status), " +
|
|
"INDEX idx_status (status), " +
|
|
|
- "INDEX idx_year_month (year_month)" +
|
|
|
|
|
|
|
+ "INDEX idx_year_month (`year_month`)" +
|
|
|
") ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='管家月度佣金结算单'");
|
|
") ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='管家月度佣金结算单'");
|
|
|
log.info("已创建butler_commission_settlements表");
|
|
log.info("已创建butler_commission_settlements表");
|
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
@@ -6597,5 +6597,8 @@ private void runMigration100() {
|
|
|
ensureColumn("promotion_tier", "team_size_1st", "INT DEFAULT 0 COMMENT '一层团队人数'");
|
|
ensureColumn("promotion_tier", "team_size_1st", "INT DEFAULT 0 COMMENT '一层团队人数'");
|
|
|
ensureColumn("promotion_tier", "team_size_2nd", "INT DEFAULT 0 COMMENT '二层团队人数'");
|
|
ensureColumn("promotion_tier", "team_size_2nd", "INT DEFAULT 0 COMMENT '二层团队人数'");
|
|
|
ensureColumn("promotion_tier", "team_size_3rd", "INT DEFAULT 0 COMMENT '三层团队人数'");
|
|
ensureColumn("promotion_tier", "team_size_3rd", "INT DEFAULT 0 COMMENT '三层团队人数'");
|
|
|
|
|
+
|
|
|
|
|
+ // 迁移105: products表添加min_quantity列(商品最小购买数量限制)
|
|
|
|
|
+ ensureColumn("products", "min_quantity", "INT DEFAULT 1 COMMENT '最小购买数量限制'");
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|