Commit f087ee58 authored by alex yao's avatar alex yao

feat: agent应用,知识库ID修正为int

parent cd3386a0
...@@ -63,7 +63,7 @@ public class AgentApplicationInfoConvert { ...@@ -63,7 +63,7 @@ public class AgentApplicationInfoConvert {
entity.setContinuousQuestionSystem(model.getContinuousQuestionSystem()); entity.setContinuousQuestionSystem(model.getContinuousQuestionSystem());
entity.setContinuousQuestionTurn(model.getContinuousQuestionTurn()); entity.setContinuousQuestionTurn(model.getContinuousQuestionTurn());
if (StringUtils.isNotBlank(model.getKnowledgeIds())) { if (StringUtils.isNotBlank(model.getKnowledgeIds())) {
entity.setKnowledgeIds(JsonUtils.deSerialize(model.getKnowledgeIds(), String[].class)); entity.setKnowledgeIds(JsonUtils.deSerialize(model.getKnowledgeIds(), Integer[].class));
} }
entity.setLargeModel(model.getLargeModel()); entity.setLargeModel(model.getLargeModel());
entity.setTopP(model.getTopP()); entity.setTopP(model.getTopP());
...@@ -235,7 +235,7 @@ public class AgentApplicationInfoConvert { ...@@ -235,7 +235,7 @@ public class AgentApplicationInfoConvert {
entity.setContinuousQuestionSystem(infoQueryItem.getContinuousQuestionSystem()); entity.setContinuousQuestionSystem(infoQueryItem.getContinuousQuestionSystem());
entity.setContinuousQuestionTurn(infoQueryItem.getContinuousQuestionTurn()); entity.setContinuousQuestionTurn(infoQueryItem.getContinuousQuestionTurn());
if (StringUtils.isNotBlank(infoQueryItem.getKnowledgeIds())) { if (StringUtils.isNotBlank(infoQueryItem.getKnowledgeIds())) {
entity.setKnowledgeIds(JsonUtils.deSerialize(infoQueryItem.getKnowledgeIds(), String[].class)); entity.setKnowledgeIds(JsonUtils.deSerialize(infoQueryItem.getKnowledgeIds(), Integer[].class));
} }
entity.setLargeModel(infoQueryItem.getLargeModel()); entity.setLargeModel(infoQueryItem.getLargeModel());
entity.setTopP(infoQueryItem.getTopP()); entity.setTopP(infoQueryItem.getTopP());
......
...@@ -48,7 +48,7 @@ public class BizAgentApplicationPublishConvert { ...@@ -48,7 +48,7 @@ public class BizAgentApplicationPublishConvert {
entity.setContinuousQuestionSystem(model.getContinuousQuestionSystem()); entity.setContinuousQuestionSystem(model.getContinuousQuestionSystem());
entity.setContinuousQuestionTurn(model.getContinuousQuestionTurn()); entity.setContinuousQuestionTurn(model.getContinuousQuestionTurn());
if (StringUtils.isNotBlank(model.getKnowledgeIds())) { if (StringUtils.isNotBlank(model.getKnowledgeIds())) {
entity.setKnowledgeIds(JsonUtils.deSerialize(model.getKnowledgeIds(), String[].class)); entity.setKnowledgeIds(JsonUtils.deSerialize(model.getKnowledgeIds(), Integer[].class));
} }
entity.setLargeModel(model.getLargeModel()); entity.setLargeModel(model.getLargeModel());
entity.setTopP(model.getTopP()); entity.setTopP(model.getTopP());
......
...@@ -9,13 +9,13 @@ public class AgentApplicationKnowledgeConfig { ...@@ -9,13 +9,13 @@ public class AgentApplicationKnowledgeConfig {
* knowledge_ids * knowledge_ids
* 知识库ID * 知识库ID
*/ */
private java.lang.String[] knowledgeIds; private java.lang.Integer[] knowledgeIds;
public java.lang.String[] getKnowledgeIds() { public java.lang.Integer[] getKnowledgeIds() {
return this.knowledgeIds; return this.knowledgeIds;
} }
public void setKnowledgeIds(java.lang.String[] knowledgeIds) { public void setKnowledgeIds(java.lang.Integer[] knowledgeIds) {
this.knowledgeIds = knowledgeIds; this.knowledgeIds = knowledgeIds;
} }
} }
...@@ -221,13 +221,13 @@ public class BizAgentApplicationInfoEntity { ...@@ -221,13 +221,13 @@ public class BizAgentApplicationInfoEntity {
* knowledge_ids * knowledge_ids
* 知识库ID * 知识库ID
*/ */
private java.lang.String[] knowledgeIds; private java.lang.Integer[] knowledgeIds;
public java.lang.String[] getKnowledgeIds() { public java.lang.Integer[] getKnowledgeIds() {
return this.knowledgeIds; return this.knowledgeIds;
} }
public void setKnowledgeIds(java.lang.String[] knowledgeIds) { public void setKnowledgeIds(java.lang.Integer[] knowledgeIds) {
this.knowledgeIds = knowledgeIds; this.knowledgeIds = knowledgeIds;
} }
......
...@@ -203,13 +203,13 @@ public class BizAgentApplicationPublishEntity { ...@@ -203,13 +203,13 @@ public class BizAgentApplicationPublishEntity {
/** knowledge_ids /** knowledge_ids
*知识库ID *知识库ID
*/ */
private java.lang.String[] knowledgeIds; private java.lang.Integer[] knowledgeIds;
public java.lang.String[] getKnowledgeIds(){ public java.lang.Integer[] getKnowledgeIds(){
return this.knowledgeIds; return this.knowledgeIds;
} }
public void setKnowledgeIds(java.lang.String[] knowledgeIds){ public void setKnowledgeIds(java.lang.Integer[] knowledgeIds){
this.knowledgeIds = knowledgeIds; this.knowledgeIds = knowledgeIds;
} }
/** large_model /** large_model
......
...@@ -103,6 +103,6 @@ public interface KnowledgeService { ...@@ -103,6 +103,6 @@ public interface KnowledgeService {
* *
* @param knowledgeInfoIds 知识库信息ID列表 * @param knowledgeInfoIds 知识库信息ID列表
*/ */
List<Integer> getKdIdsByKnowledgeInfoIds(String[] knowledgeInfoIds) throws Exception; List<Integer> getKdIdsByKnowledgeInfoIds(Integer[] knowledgeInfoIds) throws Exception;
} }
...@@ -293,12 +293,12 @@ public class KnowledgeServiceImpl implements KnowledgeService { ...@@ -293,12 +293,12 @@ public class KnowledgeServiceImpl implements KnowledgeService {
} }
@Override @Override
public List<Integer> getKdIdsByKnowledgeInfoIds(String[] knowledgeInfoIds) throws Exception { public List<Integer> getKdIdsByKnowledgeInfoIds(Integer[] knowledgeInfoIds) throws Exception {
//获取知识库配置 //获取知识库配置
List<Integer> kdIdList = new ArrayList<>(); List<Integer> kdIdList = new ArrayList<>();
if (ArrayUtils.isNotEmpty(knowledgeInfoIds)) { if (ArrayUtils.isNotEmpty(knowledgeInfoIds)) {
for (String knowledgeId : knowledgeInfoIds) { for (Integer knowledgeId : knowledgeInfoIds) {
BizKnowledgeInfoEntity bizKnowledgeInfoEntity = bizKnowledgeInfoService.get(Integer.valueOf(knowledgeId)); BizKnowledgeInfoEntity bizKnowledgeInfoEntity = bizKnowledgeInfoService.get(knowledgeId);
if (bizKnowledgeInfoEntity == null || org.apache.commons.lang3.StringUtils.isBlank(bizKnowledgeInfoEntity.getKdIds())) { if (bizKnowledgeInfoEntity == null || org.apache.commons.lang3.StringUtils.isBlank(bizKnowledgeInfoEntity.getKdIds())) {
continue; continue;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment