Commit f7561fe1 authored by alex yao's avatar alex yao

fix: 知识库文档删除,知识库状态变更

parent a3705d4f
......@@ -67,7 +67,7 @@ public class BizKnowledgeInfoServiceImpl extends BaseServiceImpl
return BizKnowledgeInfoConvert.modelToEntity(saveModel);
}
public BizKnowledgeInfoEntity update(BizKnowledgeInfoEntity entity){
public BizKnowledgeInfoEntity update(BizKnowledgeInfoEntity entity) {
Assert.notNull(entity);
Assert.notNull(entity.getId(), "update pk can not be null");
BizKnowledgeInfoModel model = this.repository.get(entity.getId());
......@@ -113,7 +113,7 @@ public class BizKnowledgeInfoServiceImpl extends BaseServiceImpl
@Override
public List<KnowledgeInfosQueryItem> knowledgeInfos(KnowledgeInfosQueryCondition condition, PagingInfo pagingInfo) throws Exception {
return this.sqlDao.query(condition, KnowledgeInfosQueryItem.class, "CREATED_TIME DESC",pagingInfo);
return this.sqlDao.query(condition, KnowledgeInfosQueryItem.class, "CREATED_TIME DESC", pagingInfo);
}
@Override
......@@ -125,9 +125,7 @@ public class BizKnowledgeInfoServiceImpl extends BaseServiceImpl
List<String> kdIdList = JsonUtils.deSerialize(kdIds, new TypeReference<List<String>>() {
}.getType());
kdIdList.remove(kdId.toString());
kdIds = JsonUtils.serialize(kdIdList.stream().map(Integer::valueOf).collect(Collectors.toList()));
kdIds = JsonUtils.serialize(kdIdList.stream().map(Integer::valueOf).distinct().collect(Collectors.toList()));
bizKnowledgeInfoModel.setKdIds(kdIds);
this.repository.save(bizKnowledgeInfoModel);
}
......
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