-在這裏插入代碼片 if("".equals(pId) ) { predicates.add(criteriaBuilder.isNull(root.get(“pId”).as(String.class))); }
在這裏插入代碼片
List<String> useridList = new ArrayList<>(); //需要注意的是這個位置 new ArrayList<>(); useridList 存的是 not in 中的參數 Repositor
原因是爲什麼? 其實很簡單 以下是我定義的Repostory接口名 發現問題沒? Jpa方法名定義了兩個參數,但是我只傳遞了一個userId,沒有status。 注意:此處的Pageable不能作爲參數,只是一個分頁,排序對象。 所以,