提交 e635a36b 作者: ZhangJingKun

Merge remote-tracking branch 'origin/master'

...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
<description>Demo project for Spring Boot</description> <description>Demo project for Spring Boot</description>
<properties> <properties>
<java.version>1.8</java.version> <java.version>1.8</java.version>
<maven.test.skip>true</maven.test.skip>
</properties> </properties>
<dependencies> <dependencies>
<dependency> <dependency>
......
...@@ -18,6 +18,7 @@ import io.swagger.annotations.Api; ...@@ -18,6 +18,7 @@ import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import lombok.Data; import lombok.Data;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
...@@ -108,6 +109,7 @@ public class KnowledgeController { ...@@ -108,6 +109,7 @@ public class KnowledgeController {
* @param knowledge * @param knowledge
* @return * @return
*/ */
//todo 添加文件
@ApiOperation(value = "知识-添加", notes = "知识-添加") @ApiOperation(value = "知识-添加", notes = "知识-添加")
@PostMapping(value = "/uploadKnowledge") @PostMapping(value = "/uploadKnowledge")
public Result<?> uploadKnowledge(HttpServletRequest request, Knowledge knowledge) { public Result<?> uploadKnowledge(HttpServletRequest request, Knowledge knowledge) {
...@@ -134,7 +136,9 @@ public class KnowledgeController { ...@@ -134,7 +136,9 @@ public class KnowledgeController {
for (KnowFile knowFileResult : resultList) { for (KnowFile knowFileResult : resultList) {
knowledge.setId(null); knowledge.setId(null);
knowledge.setTitle(null); knowledge.setTitle(null);
knowledgeService.addKnowledge(knowFileResult, knowledge, userInfo); Knowledge knowledgeNew = new Knowledge();
BeanUtils.copyProperties(knowledge, knowledgeNew);
knowledgeService.addKnowledge(knowFileResult, knowledgeNew, userInfo);
} }
} }
...@@ -177,6 +181,7 @@ public class KnowledgeController { ...@@ -177,6 +181,7 @@ public class KnowledgeController {
*/ */
@PostMapping(value = "/IntelligentQa") @PostMapping(value = "/IntelligentQa")
public Result<?> intelligentQa(@RequestBody IntelligentQaParam intelligentQaParam) throws IOException { public Result<?> intelligentQa(@RequestBody IntelligentQaParam intelligentQaParam) throws IOException {
log.info(intelligentQaParam.toString());
JSONObject params = new JSONObject(); JSONObject params = new JSONObject();
params.put("score_threshold", intelligentQaParam.getScoreThreshold()); params.put("score_threshold", intelligentQaParam.getScoreThreshold());
params.put("question", intelligentQaParam.getQuestion()); params.put("question", intelligentQaParam.getQuestion());
......
...@@ -50,10 +50,10 @@ python: ...@@ -50,10 +50,10 @@ python:
know: know:
thirdpartyurl: thirdpartyurl:
# checkuserurl: https://clb.ciglobal.cn/clb-api/sys/checkToken checkuserurl: https://clb.ciglobal.cn/clb-api/sys/checkToken
# getusersurl: https://clb.ciglobal.cn/clb-api/sys/user/thirdparty getusersurl: https://clb.ciglobal.cn/clb-api/sys/user/thirdparty
checkuserurl: http://192.168.0.124:9988/sys/checkToken # checkuserurl: http://192.168.0.124:9988/sys/checkToken
getusersurl: http://192.168.0.124:9988/sys/user/thirdparty # getusersurl: http://192.168.0.124:9988/sys/user/thirdparty
document: document:
server: server:
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论