|
|
@@ -1,6 +1,9 @@
|
|
|
package org.ruoyi.chat.service.chat.impl;
|
|
|
|
|
|
import cn.hutool.core.collection.CollectionUtil;
|
|
|
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
|
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
import jakarta.servlet.http.HttpServletRequest;
|
|
|
import lombok.RequiredArgsConstructor;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
@@ -24,10 +27,14 @@ import org.ruoyi.common.core.utils.StringUtils;
|
|
|
import org.ruoyi.common.core.utils.file.FileUtils;
|
|
|
import org.ruoyi.common.core.utils.file.MimeTypeUtils;
|
|
|
import org.ruoyi.common.satoken.utils.LoginHelper;
|
|
|
+import org.ruoyi.core.page.PageQuery;
|
|
|
+import org.ruoyi.core.page.TableDataInfo;
|
|
|
+import org.ruoyi.domain.ThinkModel;
|
|
|
import org.ruoyi.domain.bo.ChatSessionBo;
|
|
|
import org.ruoyi.domain.bo.QueryVectorBo;
|
|
|
import org.ruoyi.domain.vo.ChatModelVo;
|
|
|
import org.ruoyi.domain.vo.KnowledgeInfoVo;
|
|
|
+import org.ruoyi.mapper.ThinkProjectMapper;
|
|
|
import org.ruoyi.service.IChatModelService;
|
|
|
import org.ruoyi.service.IChatSessionService;
|
|
|
import org.ruoyi.service.IKnowledgeInfoService;
|
|
|
@@ -80,6 +87,9 @@ public class SseServiceImpl implements ISseService {
|
|
|
@Autowired
|
|
|
private JdbcTemplate jdbcTemplate;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private ThinkProjectMapper thinkProjectMapper;
|
|
|
+
|
|
|
|
|
|
@Override
|
|
|
public SseEmitter sseChat(ChatRequest chatRequest, HttpServletRequest request) {
|
|
|
@@ -332,9 +342,10 @@ public class SseServiceImpl implements ISseService {
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public List<Map<String, Object>> projeictList(ThinkProject thinkProject, HttpServletRequest request) {
|
|
|
- List<Map<String, Object>> maps = jdbcTemplate.queryForList("select * from think_project");
|
|
|
- return maps;
|
|
|
+ public TableDataInfo<org.ruoyi.domain.ThinkProject> projectList(PageQuery pageQuery) {
|
|
|
+ LambdaQueryWrapper<org.ruoyi.domain.ThinkProject> lqw = Wrappers.lambdaQuery();
|
|
|
+ Page<org.ruoyi.domain.ThinkProject> thinkProjectPage = thinkProjectMapper.selectPage(pageQuery.build(), lqw);
|
|
|
+ return TableDataInfo.build(thinkProjectPage);
|
|
|
}
|
|
|
|
|
|
@Override
|