|
|
@@ -34,6 +34,7 @@ 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.ThinkModelMapper;
|
|
|
import org.ruoyi.mapper.ThinkProjectMapper;
|
|
|
import org.ruoyi.service.IChatModelService;
|
|
|
import org.ruoyi.service.IChatSessionService;
|
|
|
@@ -89,6 +90,8 @@ public class SseServiceImpl implements ISseService {
|
|
|
|
|
|
@Autowired
|
|
|
private ThinkProjectMapper thinkProjectMapper;
|
|
|
+ @Autowired
|
|
|
+ private ThinkModelMapper thinkModelMapper;
|
|
|
|
|
|
|
|
|
@Override
|
|
|
@@ -357,15 +360,18 @@ public class SseServiceImpl implements ISseService {
|
|
|
} else if (!"".equals(map.get("rags")) && "".equals(map.get("models"))) {
|
|
|
result = jdbcTemplate.update("update think_project set rags = ? where id = ?", map.get("rags"), map.get("id"));
|
|
|
} else {
|
|
|
- result = jdbcTemplate.update("update think_project set organization = ? ,project = ?, private_key = ?, public_key = ? where id = ?", map.get("organization"), map.get("project"), map.get("private_key"), map.get("public_key"), map.get("id"));
|
|
|
+ result = jdbcTemplate.update("update think_project set organization = ? ,project = ?, private_key = ?, public_key = ? where id = ?", map.get("organization"), map.get("project"), map.get("privateKey"), map.get("publicKey"), map.get("id"));
|
|
|
}
|
|
|
return result;
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public List<Map<String, Object>> modelList() {
|
|
|
- List<Map<String, Object>> maps = jdbcTemplate.queryForList("select * from think_model");
|
|
|
- return maps;
|
|
|
+ public TableDataInfo<ThinkModel> modelList() {
|
|
|
+ List<ThinkModel> allModels = thinkModelMapper.selectList(Wrappers.lambdaQuery());
|
|
|
+ Page<ThinkModel> page = new Page<>();
|
|
|
+ page.setRecords(allModels);
|
|
|
+ page.setTotal(allModels.size());
|
|
|
+ return TableDataInfo.build(page);
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
@@ -448,8 +454,8 @@ public class SseServiceImpl implements ISseService {
|
|
|
"VALUES (?, ?, ?, ?, ?)", // 使用数据库当前时间作为创建时间
|
|
|
map.get("organization"),
|
|
|
map.get("project"),
|
|
|
- map.get("private_key"),
|
|
|
- map.get("public_key"),
|
|
|
+ map.get("privateKey"),
|
|
|
+ map.get("publicKey"),
|
|
|
"[]"// 提供sort默认值
|
|
|
);
|
|
|
return result;
|