feat(grouping): 新增分组功能并优化 Markdown 文件操作
- 新增分组实体、控制器、服务和映射器 - 实现分组创建、获取、更新和删除接口 - 优化 Markdown 文件创建、获取和删除接口- 新增全局异常处理和日志记录 - 更新数据库表结构和字段类型 - 重构前端页面,支持分组和 Markdown 文件展示
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
package com.test.bijihoudaun.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
@Schema(name = "分组实体")
|
||||
@TableName("grouping")
|
||||
public class Grouping {
|
||||
@Schema(description = "分组id",implementation = Long.class)
|
||||
@TableId(type = IdType.AUTO)
|
||||
private Long id;
|
||||
@Schema(description = "分组名称",implementation = String.class)
|
||||
private String grouping;
|
||||
}
|
||||
@@ -7,7 +7,7 @@ import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
@Schema(name = "图片实体")
|
||||
@@ -16,8 +16,6 @@ public class Image {
|
||||
@Schema(description = "图片id",implementation = Long.class)
|
||||
@TableId(type = IdType.AUTO)
|
||||
private Long id;
|
||||
@Schema(description = "外键,关联用户ID,标识图片所有者\n",implementation = Long.class )
|
||||
private Long userId;
|
||||
@Schema(description = " 外键,关联Markdown文件ID,标识图片所属文档",implementation = Long.class )
|
||||
private Long markdownId;
|
||||
|
||||
@@ -38,6 +36,6 @@ public class Image {
|
||||
@TableField("content_type")
|
||||
private String contentType;
|
||||
|
||||
@Schema(description = "图片上传时间",implementation = LocalDateTime.class )
|
||||
private LocalDateTime createdAt;
|
||||
@Schema(description = "图片上传时间",implementation = Date.class )
|
||||
private Date createdAt;
|
||||
}
|
||||
@@ -7,7 +7,7 @@ import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
@Schema(name = "文本实体")
|
||||
@@ -16,7 +16,9 @@ public class MarkdownFile {
|
||||
@Schema(description = "文本id",implementation = Long.class)
|
||||
@TableId(type = IdType.AUTO)
|
||||
private Long id;
|
||||
@Schema(description = "用户id",implementation = Long.class)
|
||||
@Schema(description = "分组表id",implementation = Long.class)
|
||||
private Long groupingId;
|
||||
@Schema(description = "用户ID",implementation = Long.class)
|
||||
private Long userId;
|
||||
@Schema(description = "文本标题",implementation = String.class)
|
||||
private String title;
|
||||
@@ -27,8 +29,8 @@ public class MarkdownFile {
|
||||
|
||||
@Schema(description = "Markdown内容,存储实际文档内容",implementation = String.class)
|
||||
private String content;
|
||||
@Schema(description = "创建时间",implementation = LocalDateTime.class)
|
||||
private LocalDateTime createdAt;
|
||||
@Schema(description = "更新时间",implementation = LocalDateTime.class)
|
||||
private LocalDateTime updatedAt;
|
||||
@Schema(description = "创建时间",implementation = Date.class)
|
||||
private Date createdAt;
|
||||
@Schema(description = "更新时间",implementation = Date.class)
|
||||
private Date updatedAt;
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@ import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
@Schema(name = "用户实体")
|
||||
@@ -21,12 +21,12 @@ public class User {
|
||||
private String password;
|
||||
@Schema(description = "邮箱",implementation = String.class)
|
||||
private String email;
|
||||
@Schema(description = "用户创建时间",implementation = String.class)
|
||||
private LocalDateTime createdAt;
|
||||
@Schema(description = "用户更新时间",implementation = String.class)
|
||||
private LocalDateTime updatedAt;
|
||||
@Schema(description = "用户创建时间",implementation = Date.class)
|
||||
private Date createdAt;
|
||||
@Schema(description = "用户更新时间",implementation = Date.class)
|
||||
private Date updatedAt;
|
||||
@Schema(description = "用户token",implementation = String.class)
|
||||
private String token;
|
||||
@Schema(description = "用户token过期时间",implementation = String.class)
|
||||
private LocalDateTime tokenEnddata;
|
||||
@Schema(description = "用户token过期时间",implementation = Date.class)
|
||||
private Date tokenEnddata;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user