- 域名信息:192.168.1.38
分页参数: pageNum=1, pageSize=10
查询条件: ChatAgentRecordBo(id=null, userId=null, content=null, sessionId=null, role=null, deductCost=null, totalTokens=null, modelName=null, remark=null, deductPower=0.0, agentName=null, tenantId=null, userName=null)
分页查询结果:[]
数据类型:class java.util.Collections$EmptyList
分页查询结果总数量: 8
分页查询结果数据: []
[ChatAgentRecordVo(id=1954722490187579394, userId=1954144358602702850, sessionId=7082b27c-4ec6-4b46-ba5c-e34924e7c7d1, content=你好,我是一个专业的舆情监控智能体,能够全面且精准地在全网(涵盖社交平台、视频网站、新闻门户网站、电商平台等各类网络平台)抓取企业、品牌、产品信息,并生成综合报告,您想要监控的的企业名称或产品是什么?
请输入完成的企业名称以及产品
示例企业:
聚味瞿记、雅绣集湘绣、艾瑞力机械
示例问题:, role=assistant, deductCost=0.0, totalTokens=0, modelName=null, remark=null, createTime=Mon Aug 11 09:52:13 CST 2025, deductPower=0.0, agentName=企业舆情, tenantId=00000, userName=17775825382), ChatAgentRecordVo(id=1954722388521844738, userId=1954144358602702850, sessionId=7082b27c-4ec6-4b46-ba5c-e34924e7c7d1, content=你好,我是一个专业的舆情监控智能体,能够全面且精准地在全网(涵盖社交平台、视频网站、新闻门户网站、电商平台等各类网络平台)抓取企业、品牌、产品信息,并生成综合报告,您想要监控的的企业名称或产品是什么?
请输入完成的企业名称以及产品
示例企业:
聚味瞿记、雅绣集湘绣、艾瑞力机械
示例问题:, role=user, deductCost=0.0, totalTokens=0, modelName=null, remark=null, createTime=Mon Aug 11 09:51:49 CST 2025, deductPower=0.0, agentName=企业舆情, tenantId=00000, userName=17775825382), ChatAgentRecordVo(id=1954144625335271425, userId=1954144358602702850, sessionId=fa8312f1-faf4-4d0f-8286-87e63165eaee, content=你好,我是智谱极速推理版,国内最快推理模型,推理速度最快可达 200 tokens/秒,比常规推理模型快 8 倍,快,更快,最快!来体验一下飞一般的感觉吧!
示例问题:, role=assistant, deductCost=0.0, totalTokens=0, modelName=null, remark=null, createTime=Sat Aug 09 19:36:00 CST 2025, deductPower=0.0, agentName=智谱极速推理版, tenantId=00000, userName=17775825382), ChatAgentRecordVo(id=1954144456527118337, userId=1954144358602702850, sessionId=fa8312f1-faf4-4d0f-8286-87e63165eaee, content=你好,我是智谱极速推理版,国内最快推理模型,推理速度最快可达 200 tokens/秒,比常规推理模型快 8 倍,快,更快,最快!来体验一下飞一般的感觉吧!
示例问题:, role=user, deductCost=0.0, totalTokens=0, modelName=null, remark=null, createTime=Sat Aug 09 19:35:19 CST 2025, deductPower=0.0, agentName=智谱极速推理版, tenantId=00000, userName=17775825382), ChatAgentRecordVo(id=1953738347945459713, userId=1942137741196181506, sessionId=46cedd1e-0ad2-4b7e-a279-67c3eab5bcba, content=你好,我是采购总监,我能助力采购决策。分析市场动态、供应商数据,优化采购流程,降低成本,提升效率与质量。
示例问题:, role=assistant, deductCost=0.0, totalTokens=0, modelName=null, remark=null, createTime=Fri Aug 08 16:41:36 CST 2025, deductPower=0.0, agentName=采购总监Agent, tenantId=00000, userName=17775825283), ChatAgentRecordVo(id=1953737995766530050, userId=1942137741196181506, sessionId=46cedd1e-0ad2-4b7e-a279-67c3eab5bcba, content=你好,我是采购总监,我能助力采购决策。分析市场动态、供应商数据,优化采购流程,降低成本,提升效率与质量。
示例问题:, role=user, deductCost=0.0, totalTokens=0, modelName=null, remark=null, createTime=Fri Aug 08 16:40:12 CST 2025, deductPower=0.0, agentName=采购总监Agent, tenantId=00000, userName=17775825283), ChatAgentRecordVo(id=1953735316457717761, userId=1942137741196181506, sessionId=null, content=你好,我是采购总监,我能助力采购决策。分析市场动态、供应商数据,优化采购流程,降低成本,提升效率与质量。
示例问题:, role=assistant, deductCost=0.0, totalTokens=0, modelName=null, remark=null, createTime=Fri Aug 08 16:29:33 CST 2025, deductPower=0.0, agentName=采购总监Agent, tenantId=00000, userName=17775825283), ChatAgentRecordVo(id=1953734945853210625, userId=1942137741196181506, sessionId=null, content=你好,我是采购总监,我能助力采购决策。分析市场动态、供应商数据,优化采购流程,降低成本,提升效率与质量。
示例问题:, role=user, deductCost=0.0, totalTokens=0, modelName=null, remark=null, createTime=Fri Aug 08 16:28:04 CST 2025, deductPower=0.0, agentName=采购总监Agent, tenantId=00000, userName=17775825283)] @Override
public TableDataInfo<ChatAgentRecordVo> queryPageList(ChatAgentRecordBo bo, PageQuery pageQuery) {
// 处理分页参数为空的情况
int pageNum = (pageQuery.getPageNum() == null) ? 1 : pageQuery.getPageNum();
int pageSize = (pageQuery.getPageSize() == null) ? 10 : pageQuery.getPageSize();
Page<ChatAgentRecordVo> page = new Page<>(pageNum,pageSize);
System.out.println("分页参数: pageNum=" + pageNum + ", pageSize=" + pageSize);
System.out.println("查询条件: " + bo);
baseMapper.selectAgentRecordList(page, bo);
System.out.println("分页查询结果:" + page.getRecords());
System.out.println("数据类型:" + page.getRecords().getClass()); // 应输出class java.util.ArrayList
if (!page.getRecords().isEmpty()) {
System.out.println("元素类型:" + page.getRecords().getClass()); //应输出class org.ruoyi.domain.ChatAgentRecordVo
}
// 打印分页结果
System.out.println("分页查询结果总数量: " + page.getTotal());
System.out.println("分页查询结果数据: " + page.getRecords());
System.out.println(baseMapper.selectAgentRecordList(page, bo));
return TableDataInfo.build(page);
}<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="org.ruoyi.mapper.ChatAgentRecordMapper">
<sql id="baseJoinSql">
SELECT
car.id,
car.session_id,
car.user_id,
su.user_name AS userName,
car.content,
car.role,
car.agent_name,
car.deduct_cost,
car.total_tokens,
car.create_time,
car.tenant_id
FROM chat_agent_record car
LEFT JOIN sys_user su ON car.user_id = su.user_id and car.tenant_id=su.tenant_id
</sql>
<select id="selectAgentRecordList" parameterType="org.ruoyi.domain.bo.ChatAgentRecordBo"
resultType="org.ruoyi.domain.vo.ChatAgentRecordVo">
SELECT
car.id,
car.session_id,
car.user_id,
su.user_name AS userName,
car.content,
car.role,
car.agent_name,
car.deduct_cost,
car.total_tokens,
car.create_time,
car.tenant_id
FROM chat_agent_record car
LEFT JOIN sys_user su ON car.user_id = su.user_id and car.tenant_id=su.tenant_id
ORDER BY car.create_time DESC
<!-- -- <include refid="baseJoinSql"/>-->
<!-- <where>-->
<!-- car.tenant_id = #{bo.tenantId}-->
<!-- <if test="bo.userId != null">-->
<!-- AND car.user_id = #{bo.userId}-->
<!-- </if>-->
<!-- <if test="bo.agentName != null and bo.agentName != ''">-->
<!-- AND car.agent_name LIKE CONCAT('%', #{bo.agentName}, '%')-->
<!-- </if>-->
<!-- <if test="bo.userName != null and bo.userName != ''">-->
<!-- AND su.user_name LIKE CONCAT('%', #{bo.userName}, '%')-->
<!-- </if>-->
<!-- <if test="bo.params != null and bo.params.beginTime != null and bo.params.endTime != null">-->
<!-- AND car.create_time BETWEEN #{bo.params.beginTime} AND #{bo.params.endTime}-->
<!-- </if>-->
<!-- </where>-->
</select>
</mapper>
为什么还是查询为{
"total": 8,
"rows": [],
"code": 200,
"msg": "查询成功"
}