瀏覽代碼

聊天主题新增智能体id

lamphua 5 天之前
父節點
當前提交
8615e8e045

+ 14
- 0
llm-back/ruoyi-system/src/main/java/com/ruoyi/llm/domain/CmcTopic.java 查看文件

@@ -18,6 +18,10 @@ public class CmcTopic extends BaseEntity
18 18
     /** 聊天主题id */
19 19
     private String topicId;
20 20
 
21
+    /** 智能体id */
22
+    @Excel(name = "智能体id")
23
+    private Integer agentId;
24
+
21 25
     /** 主题 */
22 26
     @Excel(name = "主题")
23 27
     private String topic;
@@ -40,12 +44,22 @@ public class CmcTopic extends BaseEntity
40 44
     {
41 45
         return topic;
42 46
     }
47
+    public void setAgentId(Integer agentId)
48
+    {
49
+        this.agentId = agentId;
50
+    }
51
+
52
+    public Integer getAgentId()
53
+    {
54
+        return agentId;
55
+    }
43 56
 
44 57
     @Override
45 58
     public String toString() {
46 59
         return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
47 60
             .append("topicId", getTopicId())
48 61
             .append("topic", getTopic())
62
+                .append("agentId", getAgentId())
49 63
             .append("createTime", getCreateTime())
50 64
             .toString();
51 65
     }

+ 6
- 1
llm-back/ruoyi-system/src/main/resources/mapper/llm/CmcTopicMapper.xml 查看文件

@@ -7,17 +7,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
7 7
     <resultMap type="CmcTopic" id="CmcTopicResult">
8 8
         <result property="topicId"    column="topic_id"    />
9 9
         <result property="topic"    column="topic"    />
10
+        <result property="agentId"    column="agent_id"    />
10 11
         <result property="createTime"    column="create_time"    />
11 12
     </resultMap>
12 13
 
13 14
     <sql id="selectCmcTopicVo">
14
-        select topic_id, topic, create_time from cmc_topic
15
+        select topic_id, topic, agent_id, create_time from cmc_topic
15 16
     </sql>
16 17
 
17 18
     <select id="selectCmcTopicList" parameterType="CmcTopic" resultMap="CmcTopicResult">
18 19
         <include refid="selectCmcTopicVo"/>
19 20
         <where>  
20 21
             <if test="topic != null  and topic != ''"> and topic = #{topic}</if>
22
+            <if test="agentId != null "> and agent_id = #{agentId}</if>
21 23
         </where>
22 24
         order by create_time desc
23 25
     </select>
@@ -32,11 +34,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
32 34
         <trim prefix="(" suffix=")" suffixOverrides=",">
33 35
             <if test="topicId != null">topic_id,</if>
34 36
             <if test="topic != null">topic,</if>
37
+            <if test="agentId != null">agent_id,</if>
35 38
             <if test="createTime != null">create_time,</if>
36 39
          </trim>
37 40
         <trim prefix="values (" suffix=")" suffixOverrides=",">
38 41
             <if test="topicId != null">#{topicId},</if>
39 42
             <if test="topic != null">#{topic},</if>
43
+            <if test="agentId != null">#{agentId},</if>
40 44
             <if test="createTime != null">#{createTime},</if>
41 45
          </trim>
42 46
     </insert>
@@ -45,6 +49,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
45 49
         update cmc_topic
46 50
         <trim prefix="SET" suffixOverrides=",">
47 51
             <if test="topic != null">topic = #{topic},</if>
52
+            <if test="agentId != null">agent_id = #{agentId},</if>
48 53
             <if test="createTime != null">create_time = #{createTime},</if>
49 54
         </trim>
50 55
         where topic_id = #{topicId}

Loading…
取消
儲存