查询条件加上审核状态

master
xiong_cl 8 months ago
parent 416fb01ba1
commit ccfcdd656b
  1. 5
      shandan-system/src/main/java/com/keyware/shandan/bianmu/service/DirectoryTreeService.java

@ -153,7 +153,7 @@ public class DirectoryTreeService {
return directoryService.list(wrapper); return directoryService.list(wrapper);
} }
public Page<DirectoryResource> resourcePage(Page<DirectoryResource> page, String parentId, String text, boolean all) { public Page<DirectoryResource> resourcePage(Page<DirectoryResource> page, String parentId, String text, boolean all,String reviewStatus) {
DirectoryVo parent = directoryService.getById(parentId); DirectoryVo parent = directoryService.getById(parentId);
HashSet<DirectoryVo> allDir = new HashSet<>(); HashSet<DirectoryVo> allDir = new HashSet<>();
if (all) { if (all) {
@ -165,7 +165,8 @@ public class DirectoryTreeService {
Set<String> dirIds = allDir.stream().map(DirectoryVo::getId).filter(allowDirIds::contains).collect(Collectors.toSet()); Set<String> dirIds = allDir.stream().map(DirectoryVo::getId).filter(allowDirIds::contains).collect(Collectors.toSet());
QueryWrapper<DirectoryResource> query = new QueryWrapper<>(); QueryWrapper<DirectoryResource> query = new QueryWrapper<>();
query.in("PARENT_ID", dirIds); query.in(dirIds.size()>0,"PARENT_ID", dirIds);
query.eq(StringUtils.hasText(reviewStatus),"REVIEW_STATUS", reviewStatus);
if (StringUtils.hasText(text)) { if (StringUtils.hasText(text)) {
query.and(queryWrapper -> { query.and(queryWrapper -> {
queryWrapper. queryWrapper.