|
|
|
@ -69,14 +69,20 @@ public class UmsStudentManageServiceImpl extends ServiceImpl<UmsStudentManageMap |
|
|
|
|
//对集合里的数据进行模糊和分页查询
|
|
|
|
|
if (umsStudentPageQueryDTO.getName() != null){ |
|
|
|
|
List<UmsStudentManage> umsStudentManageList = umsStudentManages.stream() |
|
|
|
|
.filter(studentManage -> studentManage.getName().contains(umsStudentPageQueryDTO.getName())) |
|
|
|
|
.filter(studentManage -> |
|
|
|
|
studentManage != null && |
|
|
|
|
studentManage.getName() != null && |
|
|
|
|
studentManage.getName().contains(umsStudentPageQueryDTO.getName())) |
|
|
|
|
.skip((umsStudentPageQueryDTO.getPage() - 1) * umsStudentPageQueryDTO.getPageSize()) |
|
|
|
|
.limit(umsStudentPageQueryDTO.getPageSize()) |
|
|
|
|
.collect(Collectors.toList()); |
|
|
|
|
result.put("Records", umsStudentManageList); |
|
|
|
|
}else if (umsStudentPageQueryDTO.getNumber() != null){ |
|
|
|
|
List<UmsStudentManage> umsStudentManageList = umsStudentManages.stream() |
|
|
|
|
.filter(studentManage -> studentManage.getNumber().contains(umsStudentPageQueryDTO.getNumber())) |
|
|
|
|
.filter(studentManage -> |
|
|
|
|
studentManage != null && |
|
|
|
|
studentManage.getNumber() != null && |
|
|
|
|
studentManage.getNumber().contains(umsStudentPageQueryDTO.getNumber())) |
|
|
|
|
.skip((umsStudentPageQueryDTO.getPage() - 1) * umsStudentPageQueryDTO.getPageSize()) |
|
|
|
|
.limit(umsStudentPageQueryDTO.getPageSize()) |
|
|
|
|
.collect(Collectors.toList()); |
|
|
|
|