List<BaseTestPaper> baseTestPapers = this.lambdaQuery() .like(pageTestPaperDto.getCourseType() != null, BaseTestPaper::getCourseType, pageTestPaperDto.getCourseType()) // courseType .like(pageTestPaperDto.getCategoryId() != null, BaseTestPaper::getCategoryId, pageTestPaperDto.getCategoryId()) // categoryId .like(pageTestPaperDto.getTestPaperType() != null, BaseTestPaper::getTestPaperType, pageTestPaperDto.getTestPaperType()) // testPaperType .like(pageTestPaperDto.getFeeFlag() != null, BaseTestPaper::getFeeFlag, pageTestPaperDto.getFeeFlag()) // feeFlag .like(StringUtils.isNotBlank(pageTestPaperDto.getKeyword()), BaseTestPaper::getTestPaperName, pageTestPaperDto.getKeyword()) // keyword .list();
标签:pageTestPaperDto,分页,getCategoryId,搜索,getCourseType,lambdaQuery,null,BaseTestPape From: https://www.cnblogs.com/p201821460026/p/17624341.html