提交 db697fa2 作者: chenshiqiang

send new topic to kafka

上级 8497a1d9
...@@ -78,7 +78,7 @@ public class KnowledgeController { ...@@ -78,7 +78,7 @@ public class KnowledgeController {
if(!knowledgeVO.getPublishDate().isEmpty()){ if(!knowledgeVO.getPublishDate().isEmpty()){
knowledgeVO.setPublishDate(EsDateUtil.esFieldDateMapping(knowledgeVO.getPublishDate())); knowledgeVO.setPublishDate(EsDateUtil.esFieldDateMapping(knowledgeVO.getPublishDate()));
} }
if(!knowledgeVO.getVerifyTime().isEmpty()){ if(null!=knowledgeVO.getVerifyTime()&&(!knowledgeVO.getVerifyTime().isEmpty())){
knowledgeVO.setVerifyTime(EsDateUtil.esFieldDateMapping(knowledgeVO.getVerifyTime())); knowledgeVO.setVerifyTime(EsDateUtil.esFieldDateMapping(knowledgeVO.getVerifyTime()));
} }
return Result.OK(knowledgeVO); return Result.OK(knowledgeVO);
......
...@@ -102,7 +102,7 @@ public class Knowledge implements Serializable { ...@@ -102,7 +102,7 @@ public class Knowledge implements Serializable {
* 知识库id * 知识库id
*/ */
private String kbKnowledgeId; private String kbKnowledgeId;
private String content; private String contentAll;
/** /**
* 类型 * 类型
*/ */
......
...@@ -21,5 +21,5 @@ public interface KnowledgeChannel { ...@@ -21,5 +21,5 @@ public interface KnowledgeChannel {
MessageChannel knowledgeContents(); MessageChannel knowledgeContents();
@Output @Output
MessageChannel knowledgeExcelContents(); MessageChannel knowledgeExcels();
} }
...@@ -50,6 +50,7 @@ public class KnowledgeMessage { ...@@ -50,6 +50,7 @@ public class KnowledgeMessage {
*/ */
private String type; private String type;
private String author; private String author;
private String contentAll;
private List<Content> contents; private List<Content> contents;
......
...@@ -36,6 +36,6 @@ public class ProduceInfo { ...@@ -36,6 +36,6 @@ public class ProduceInfo {
public void sendKnowledgeExcelContents(KnowledgeMessage knowledgeMessage) { public void sendKnowledgeExcelContents(KnowledgeMessage knowledgeMessage) {
String msg = JSON.toJSONString(knowledgeMessage); String msg = JSON.toJSONString(knowledgeMessage);
Message<String> message = MessageBuilder.withPayload(msg).build(); Message<String> message = MessageBuilder.withPayload(msg).build();
channel.knowledgeExcelContents().send(message); channel.knowledgeExcels().send(message);
} }
} }
...@@ -518,12 +518,11 @@ class KnowledgeServiceImpl implements IKnowledgeService { ...@@ -518,12 +518,11 @@ class KnowledgeServiceImpl implements IKnowledgeService {
continue; continue;
} }
if (StringUtils.isNotEmpty(info.get(1))) { if (StringUtils.isNotEmpty(info.get(1))) {
specialInformation.setContent(info.get(1)); specialInformation.setContentAll(info.get(1));
//段落切分 // //段落切分
// specialInformation.setContents(Collections.singletonList(Content.builder()
specialInformation.setContents(Collections.singletonList(Content.builder() // .contentId(codeGenerateUtil.geneIdNo(Constants.FINANCE, 8))
.contentId(codeGenerateUtil.geneIdNo(Constants.FINANCE, 8)) // .content(info.get(1)).build()));
.content(info.get(1)).build()));
} else { } else {
log.error("上传的数据{}正文为空,此条数据忽略", info.get(0)); log.error("上传的数据{}正文为空,此条数据忽略", info.get(0));
continue; continue;
......
...@@ -31,6 +31,7 @@ public class KnowledgeVO { ...@@ -31,6 +31,7 @@ public class KnowledgeVO {
private String verifierName; private String verifierName;
private String origin; private String origin;
private String author; private String author;
private String contentAll;
private Integer score; private Integer score;
private Integer verifyStatus; private Integer verifyStatus;
private Integer importData; private Integer importData;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论