Browse Source

聊天主题新增智能体id

lamphua 5 days ago
parent
commit
8615e8e045

+ 14
- 0
llm-back/ruoyi-system/src/main/java/com/ruoyi/llm/domain/CmcTopic.java View File

18
     /** 聊天主题id */
18
     /** 聊天主题id */
19
     private String topicId;
19
     private String topicId;
20
 
20
 
21
+    /** 智能体id */
22
+    @Excel(name = "智能体id")
23
+    private Integer agentId;
24
+
21
     /** 主题 */
25
     /** 主题 */
22
     @Excel(name = "主题")
26
     @Excel(name = "主题")
23
     private String topic;
27
     private String topic;
40
     {
44
     {
41
         return topic;
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
     @Override
57
     @Override
45
     public String toString() {
58
     public String toString() {
46
         return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
59
         return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
47
             .append("topicId", getTopicId())
60
             .append("topicId", getTopicId())
48
             .append("topic", getTopic())
61
             .append("topic", getTopic())
62
+                .append("agentId", getAgentId())
49
             .append("createTime", getCreateTime())
63
             .append("createTime", getCreateTime())
50
             .toString();
64
             .toString();
51
     }
65
     }

+ 6
- 1
llm-back/ruoyi-system/src/main/resources/mapper/llm/CmcTopicMapper.xml View File

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

Loading…
Cancel
Save