public int searchTest(String name, Integer pageIndex, List<Test> resultList){ def criteria = Test.createCriteria() List testList = criteria.list(max: 10, offset: pageIndex) { eq("name", name) order("createTime", "desc") } resultList.addAll(testList) int total = resultList.size() return total }
时间: 2024-10-09 09:11:37