bug修复

This commit is contained in:
chuyan 2020-09-11 21:00:10 +08:00
parent dc08efbaba
commit 882e5afa5d
2 changed files with 2 additions and 2 deletions

View File

@ -7,5 +7,5 @@ import org.springframework.web.bind.annotation.RestController;
@RequestMapping("student") @RequestMapping("student")
public class StudentController { public class StudentController {
public //public
} }

View File

@ -31,7 +31,7 @@ public class CalculationService {
* @return 计算好的学分绩 * @return 计算好的学分绩
*/ */
public float calculateGPA(int studentId){ public float calculateGPA(int studentId){
if(checkStudentExistence(studentId)){ if(!checkStudentExistence(studentId)){
throw new NotFoundException("No such student."); throw new NotFoundException("No such student.");
} }
List<StudentCourse> studentCourses = studentCourseRepository.findByStudentId(studentId); List<StudentCourse> studentCourses = studentCourseRepository.findByStudentId(studentId);