feat: 完成情绪博物馆项目重构和功能增强 - 新增日记评论和帖子功能 - 重构前端架构,优化用户体验 - 完善WebSocket通信机制 - 更新项目文档和部署配置

This commit is contained in:
2025-07-27 10:05:59 +08:00
parent 6903ac1c0d
commit cc886cd4d5
126 changed files with 21179 additions and 15734 deletions
@@ -0,0 +1,129 @@
package com.emotion.entity;
import com.baomidou.mybatisplus.annotation.*;
import com.emotion.common.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.SuperBuilder;
import lombok.NoArgsConstructor;
import lombok.AllArgsConstructor;
import java.math.BigDecimal;
import java.time.LocalDateTime;
/**
* 日记评论实体类
*
* @author emotion-museum
* @date 2025-07-23
*/
@Data
@EqualsAndHashCode(callSuper = true)
@SuperBuilder
@NoArgsConstructor
@AllArgsConstructor
@TableName("diary_comment")
public class DiaryComment extends BaseEntity {
/**
* 日记ID
*/
@TableField("diary_id")
private String diaryId;
/**
* 评论用户ID
*/
@TableField("user_id")
private String userId;
/**
* 父评论ID (用于回复功能)
*/
@TableField("parent_comment_id")
private String parentCommentId;
/**
* 评论内容
*/
@TableField("content")
private String content;
/**
* 评论图片 (存储图片URL数组)
*/
@TableField("images")
private String images;
/**
* 评论类型: user-用户评论, ai-AI评论, system-系统评论
*/
@TableField("comment_type")
private String commentType;
/**
* AI评论来源 (如: emotion_analysis, sentiment_analysis)
*/
@TableField("ai_comment_source")
private String aiCommentSource;
/**
* 点赞数
*/
@TableField("like_count")
private Integer likeCount;
/**
* 回复数
*/
@TableField("reply_count")
private Integer replyCount;
/**
* 是否匿名评论: 0-实名, 1-匿名
*/
@TableField("is_anonymous")
private Integer isAnonymous;
/**
* 是否置顶: 0-普通, 1-置顶
*/
@TableField("is_top")
private Integer isTop;
/**
* 状态: published-已发布, hidden-隐藏, deleted-已删除
*/
@TableField("status")
private String status;
/**
* 发布时间
*/
@TableField("publish_time")
private LocalDateTime publishTime;
/**
* 最后回复时间
*/
@TableField("last_reply_time")
private LocalDateTime lastReplyTime;
/**
* 情绪评分
*/
@TableField("emotion_score")
private BigDecimal emotionScore;
/**
* 情感评分
*/
@TableField("sentiment_score")
private BigDecimal sentimentScore;
/**
* 扩展元数据
*/
@TableField("metadata")
private String metadata;
}
@@ -0,0 +1,207 @@
package com.emotion.entity;
import com.baomidou.mybatisplus.annotation.*;
import com.emotion.common.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.SuperBuilder;
import lombok.NoArgsConstructor;
import lombok.AllArgsConstructor;
import java.math.BigDecimal;
import java.time.LocalDateTime;
/**
* 用户日记实体类
*
* @author emotion-museum
* @date 2025-07-23
*/
@Data
@EqualsAndHashCode(callSuper = true)
@SuperBuilder
@NoArgsConstructor
@AllArgsConstructor
@TableName("diary_post")
public class DiaryPost extends BaseEntity {
/**
* 用户ID
*/
@TableField("user_id")
private String userId;
/**
* 日记标题
*/
@TableField("title")
private String title;
/**
* 日记内容
*/
@TableField("content")
private String content;
/**
* 图片列表 (存储图片URL数组)
*/
@TableField("images")
private String images;
/**
* 视频列表 (存储视频URL数组)
*/
@TableField("videos")
private String videos;
/**
* 发布地点
*/
@TableField("location")
private String location;
/**
* 纬度
*/
@TableField("latitude")
private BigDecimal latitude;
/**
* 经度
*/
@TableField("longitude")
private BigDecimal longitude;
/**
* 天气信息
*/
@TableField("weather")
private String weather;
/**
* 心情状态
*/
@TableField("mood")
private String mood;
/**
* 心情评分 (0-10)
*/
@TableField("mood_score")
private BigDecimal moodScore;
/**
* 标签列表
*/
@TableField("tags")
private String tags;
/**
* 是否公开: 0-仅自己可见, 1-公开
*/
@TableField("is_public")
private Integer isPublic;
/**
* 是否匿名发布: 0-实名, 1-匿名
*/
@TableField("is_anonymous")
private Integer isAnonymous;
/**
* 浏览数
*/
@TableField("view_count")
private Integer viewCount;
/**
* 点赞数
*/
@TableField("like_count")
private Integer likeCount;
/**
* 评论数
*/
@TableField("comment_count")
private Integer commentCount;
/**
* 分享数
*/
@TableField("share_count")
private Integer shareCount;
/**
* AI评论内容
*/
@TableField("ai_comment")
private String aiComment;
/**
* AI评论时间
*/
@TableField("ai_comment_time")
private LocalDateTime aiCommentTime;
/**
* AI情绪分析结果
*/
@TableField("ai_emotion_analysis")
private String aiEmotionAnalysis;
/**
* AI情感评分 (-1到1)
*/
@TableField("ai_sentiment_score")
private BigDecimal aiSentimentScore;
/**
* AI提取的关键词
*/
@TableField("ai_keywords")
private String aiKeywords;
/**
* AI建议
*/
@TableField("ai_suggestions")
private String aiSuggestions;
/**
* 发布时间
*/
@TableField("publish_time")
private LocalDateTime publishTime;
/**
* 最后评论时间
*/
@TableField("last_comment_time")
private LocalDateTime lastCommentTime;
/**
* 状态: draft-草稿, published-已发布, hidden-隐藏, deleted-已删除
*/
@TableField("status")
private String status;
/**
* 优先级 (用于置顶功能)
*/
@TableField("priority")
private Integer priority;
/**
* 是否精选: 0-普通, 1-精选
*/
@TableField("featured")
private Integer featured;
/**
* 扩展元数据
*/
@TableField("metadata")
private String metadata;
}