class id 不允许null

This commit is contained in:
2026-08-25 15:11:59 +08:00
parent b29f92cecc
commit b3eaf4ede5
@@ -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);
}