Files
timeline-server/deploy/update_story_share_template.sql
jianghao 7e3e1f66f1
All checks were successful
test/timeline-server/pipeline/head This commit looks good
feat(分享): 新增故事分享反馈功能
实现故事分享的评论和浏览统计功能,包括:
1. 新增StoryShareFeedbackService接口及相关实现
2. 添加StoryShareComment、StoryShareMetric实体类
3. 创建story_share_comment和story_share_metric表
4. 在StoryDetailVo中增加shareConfigured和sharePublished字段
5. 扩展StoryShareConfigVo包含反馈统计数据
6. 新增公共API端点处理反馈请求
7. 实现模板样式选择功能
2026-03-18 14:05:42 +08:00

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;