class id 不允许null
This commit is contained in:
@@ -21,6 +21,7 @@ import com.yunhai.bschclassmanage.service.ISchClassService;
|
|||||||
import com.yunhai.bschclassmanage.service.ISchStudentService;
|
import com.yunhai.bschclassmanage.service.ISchStudentService;
|
||||||
import com.yunhai.bschclassmanage.utils.EasyPoiUtils;
|
import com.yunhai.bschclassmanage.utils.EasyPoiUtils;
|
||||||
import com.yunhai.bschclassmanage.utils.UserContext;
|
import com.yunhai.bschclassmanage.utils.UserContext;
|
||||||
|
import com.yunhai.platform.utils.exception.DException;
|
||||||
import org.apache.poi.ss.usermodel.Workbook;
|
import org.apache.poi.ss.usermodel.Workbook;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.data.domain.Pageable;
|
import org.springframework.data.domain.Pageable;
|
||||||
@@ -76,6 +77,14 @@ public class SchStudentController extends BaseController {
|
|||||||
@RequestParam(required = false) Integer classId,
|
@RequestParam(required = false) Integer classId,
|
||||||
@RequestParam(required = false) String keyword,
|
@RequestParam(required = false) String keyword,
|
||||||
Pageable pageable) {
|
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);
|
return schStudentService.searchBaseSchStudentVO(UserContext.getSchId(),schsystemId,gradeId,classId,keyword,false,pageable);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user