All checks were successful
test/timeline-server/pipeline/head This commit looks good
实现故事分享的评论和浏览统计功能,包括: 1. 新增StoryShareFeedbackService接口及相关实现 2. 添加StoryShareComment、StoryShareMetric实体类 3. 创建story_share_comment和story_share_metric表 4. 在StoryDetailVo中增加shareConfigured和sharePublished字段 5. 扩展StoryShareConfigVo包含反馈统计数据 6. 新增公共API端点处理反馈请求 7. 实现模板样式选择功能
25 lines
768 B
SQL
25 lines
768 B
SQL
SET @story_share_table_exists = (
|
|
SELECT COUNT(*)
|
|
FROM information_schema.TABLES
|
|
WHERE TABLE_SCHEMA = DATABASE()
|
|
AND TABLE_NAME = 'story_share'
|
|
);
|
|
|
|
SET @story_share_template_exists = (
|
|
SELECT COUNT(*)
|
|
FROM information_schema.COLUMNS
|
|
WHERE TABLE_SCHEMA = DATABASE()
|
|
AND TABLE_NAME = 'story_share'
|
|
AND COLUMN_NAME = 'template_style'
|
|
);
|
|
|
|
SET @story_share_template_stmt = IF(
|
|
@story_share_table_exists = 1 AND @story_share_template_exists = 0,
|
|
"ALTER TABLE story_share ADD COLUMN template_style varchar(32) DEFAULT 'editorial' COMMENT 'Public template style' AFTER share_quote",
|
|
'SELECT 1'
|
|
);
|
|
|
|
PREPARE story_share_template_stmt FROM @story_share_template_stmt;
|
|
EXECUTE story_share_template_stmt;
|
|
DEALLOCATE PREPARE story_share_template_stmt;
|