From 87478199461dd1b667ffb9696627242452289499 Mon Sep 17 00:00:00 2001 From: luoweijian <1329394916@qq.com> Date: Fri, 20 Mar 2026 17:33:24 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=96=87=E6=A1=A3=E8=81=9A?= =?UTF-8?q?=E7=B1=BB=E5=AE=9E=E4=BD=93=E7=B1=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../domain/entity/KnowledgeClusterEntity.java | 40 +++++++++++++++++++ .../mapper/KnowledgeClusterMapper.java | 9 +++++ .../entity/TaskKnowledgeClusterEntity.java | 9 ++++- 3 files changed, 56 insertions(+), 2 deletions(-) create mode 100644 src/main/java/com/project/information/domain/entity/KnowledgeClusterEntity.java create mode 100644 src/main/java/com/project/information/mapper/KnowledgeClusterMapper.java diff --git a/src/main/java/com/project/information/domain/entity/KnowledgeClusterEntity.java b/src/main/java/com/project/information/domain/entity/KnowledgeClusterEntity.java new file mode 100644 index 0000000..d3079b0 --- /dev/null +++ b/src/main/java/com/project/information/domain/entity/KnowledgeClusterEntity.java @@ -0,0 +1,40 @@ +package com.project.information.domain.entity; + + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import com.project.base.domain.entity.BaseEntity; +import jakarta.persistence.*; +import lombok.Data; +import lombok.EqualsAndHashCode; +import org.hibernate.annotations.Comment; + +@Data +@Table(name = "evaluator_knowledge_cluster" , + indexes = {@Index(name = "Idx_informationId", columnList = "information_id")}) +@Entity +@TableName(value = "evaluator_knowledge_cluster", autoResultMap = true) +@EqualsAndHashCode(callSuper = true) +public class KnowledgeClusterEntity extends BaseEntity { + + @TableId(value = "id" , type = IdType.ASSIGN_ID) + @Id + private Long id; + + @Column(name = "information_id") + @TableField("information_id") + @Comment("资料id") + private Long informationId; + + @Column(name = "cluster_topic", length = 2000) + @Comment("簇主题/标签(由AI聚类后总结提取)") + @TableField("cluster_topic") + private String clusterTopic; + + @Column(name = "cluster_size") + @TableField("cluster_size") + @Comment("簇大小(W):该簇包含的知识点个数") + private Integer clusterSize; +} diff --git a/src/main/java/com/project/information/mapper/KnowledgeClusterMapper.java b/src/main/java/com/project/information/mapper/KnowledgeClusterMapper.java new file mode 100644 index 0000000..3cf8fab --- /dev/null +++ b/src/main/java/com/project/information/mapper/KnowledgeClusterMapper.java @@ -0,0 +1,9 @@ +package com.project.information.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.project.information.domain.entity.KnowledgeClusterEntity; +import org.apache.ibatis.annotations.Mapper; + +@Mapper +public interface KnowledgeClusterMapper extends BaseMapper { +} diff --git a/src/main/java/com/project/question/domain/entity/TaskKnowledgeClusterEntity.java b/src/main/java/com/project/question/domain/entity/TaskKnowledgeClusterEntity.java index b9c3264..c33a975 100644 --- a/src/main/java/com/project/question/domain/entity/TaskKnowledgeClusterEntity.java +++ b/src/main/java/com/project/question/domain/entity/TaskKnowledgeClusterEntity.java @@ -26,10 +26,15 @@ public class TaskKnowledgeClusterEntity extends BaseEntity { @Comment("所属考试任务ID") private Long taskId; - @Column(name = "cluster_topic", length = 512) + + @Column(name = "information_id") + @TableField("information_id") + @Comment("资料id") + private Long informationId; + + @Column(name = "cluster_topic", length = 2000) @Comment("簇主题/标签(由AI聚类后总结提取)") @TableField("cluster_topic") - private String clusterTopic; @Column(name = "cluster_size")