|
@@ -71,13 +71,28 @@ public class KlConceptFacade extends KlConceptServiceImpl {
|
|
|
return retList;
|
|
|
}
|
|
|
//根据id检索
|
|
|
+ List<KlConcept> concepts = Lists.newLinkedList();
|
|
|
+ List<KlConcept> tempList = Lists.newLinkedList();
|
|
|
QueryWrapper<KlConcept> queryWrapper = new QueryWrapper<>();
|
|
|
- queryWrapper.eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
|
- .in("id", conceptVO.getIds());
|
|
|
+ queryWrapper.eq("is_deleted", IsDeleteEnum.N.getKey());
|
|
|
if (conceptVO.getStatus() != null) {
|
|
|
queryWrapper.eq("status", conceptVO.getStatus());
|
|
|
+ if (conceptVO.getStatus().equals(StatusEnum.Disable.getKey())) {
|
|
|
+ tempList = this.list(queryWrapper);
|
|
|
+ if (ListUtil.isNotEmpty(tempList)) {
|
|
|
+ Map<Long, KlConcept> tempMap = tempList.stream().collect(Collectors.toMap(KlConcept::getId, v -> v));
|
|
|
+ for (Map.Entry<Long, KlConcept> entry : tempMap.entrySet()) {
|
|
|
+ if (conceptVO.getIds().contains(entry.getKey())) {
|
|
|
+ concepts.add(entry.getValue());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (conceptVO.getStatus() == null || conceptVO.getStatus().equals(StatusEnum.Enable.getKey())) {
|
|
|
+ queryWrapper.in("id", conceptVO.getIds());
|
|
|
+ concepts = this.list(queryWrapper);
|
|
|
}
|
|
|
- List<KlConcept> concepts = this.list(queryWrapper);
|
|
|
for (KlConcept concept : concepts) {
|
|
|
IndexBatchDTO dto = new IndexBatchDTO();
|
|
|
dto.setId(concept.getId());
|