diff --git a/src/main/java/com/yunhai/bschclassmanage/controller/api/SchStudentController.java b/src/main/java/com/yunhai/bschclassmanage/controller/api/SchStudentController.java index 566e98f..c89d1cc 100644 --- a/src/main/java/com/yunhai/bschclassmanage/controller/api/SchStudentController.java +++ b/src/main/java/com/yunhai/bschclassmanage/controller/api/SchStudentController.java @@ -21,6 +21,7 @@ import com.yunhai.bschclassmanage.service.ISchClassService; import com.yunhai.bschclassmanage.service.ISchStudentService; import com.yunhai.bschclassmanage.utils.EasyPoiUtils; import com.yunhai.bschclassmanage.utils.UserContext; +import com.yunhai.platform.utils.exception.DException; import org.apache.poi.ss.usermodel.Workbook; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.domain.Pageable; @@ -76,6 +77,14 @@ public class SchStudentController extends BaseController { @RequestParam(required = false) Integer classId, @RequestParam(required = false) String keyword, Pageable pageable) { + if(gradeId==null) + { + throw new DException("年级ID不允许为空"); + } + if(classId==null||classId<=0) + { + throw new DException("班级ID不允许为空"); + } return schStudentService.searchBaseSchStudentVO(UserContext.getSchId(),schsystemId,gradeId,classId,keyword,false,pageable); }