diff --git a/src/main/java/com/teaching/backend/controller/umsAdmin/UmsStudentManageController.java b/src/main/java/com/teaching/backend/controller/umsAdmin/UmsStudentManageController.java index 8e66e13..b36cebf 100644 --- a/src/main/java/com/teaching/backend/controller/umsAdmin/UmsStudentManageController.java +++ b/src/main/java/com/teaching/backend/controller/umsAdmin/UmsStudentManageController.java @@ -1,6 +1,7 @@ package com.teaching.backend.controller.umsAdmin; import com.teaching.backend.common.CommonResult; +import com.teaching.backend.filter.ValidateParams; import com.teaching.backend.model.dto.umsAdmin.UmsStudentPageQueryDTO; import com.teaching.backend.model.entity.umsAdmin.UmsStudentManage; import com.teaching.backend.service.umsAdmin.UmsStudentManageService; @@ -28,6 +29,7 @@ public class UmsStudentManageController { * @return */ @GetMapping("/page") + @ValidateParams({"page","pageSize", "userId"}) // 需要校验的参数 @ApiOperation("学生管理分页查询") public CommonResult> page(UmsStudentPageQueryDTO umsStudentPageQueryDTO){ Map pageResult = umsStudentManageService.pageQuery(umsStudentPageQueryDTO); diff --git a/src/main/java/com/teaching/backend/service/impl/umsAdmin/UmsStudentManageServiceImpl.java b/src/main/java/com/teaching/backend/service/impl/umsAdmin/UmsStudentManageServiceImpl.java index 23cff82..a865c84 100644 --- a/src/main/java/com/teaching/backend/service/impl/umsAdmin/UmsStudentManageServiceImpl.java +++ b/src/main/java/com/teaching/backend/service/impl/umsAdmin/UmsStudentManageServiceImpl.java @@ -15,6 +15,7 @@ import org.springframework.beans.factory.annotation.Value; import org.springframework.security.crypto.password.PasswordEncoder; import org.springframework.stereotype.Component; import org.springframework.stereotype.Service; +import org.springframework.util.StringUtils; import java.sql.Connection; import java.sql.DriverManager; @@ -67,7 +68,7 @@ public class UmsStudentManageServiceImpl extends ServiceImpl umsStudentManageList = umsStudentManages.stream() .filter(studentManage -> studentManage != null && @@ -77,7 +78,7 @@ public class UmsStudentManageServiceImpl extends ServiceImpl umsStudentManageList = umsStudentManages.stream() .filter(studentManage -> studentManage != null &&