Commit 71cb2e24 authored by Mindfaker's avatar Mindfaker

fix

parent fb78763d
......@@ -62,7 +62,7 @@ public class StudentInfoService {
* @param studentInfo
* @return
*/
public Object updateStudentInfo(StudentInfo studentInfo) {
public String updateStudentInfo(StudentInfo studentInfo) {
StudentInfo studentInfo1 = selectStudentInfoByUniqueId(studentInfo.getStudentUniqueId());
if (studentInfo1 != null && !studentInfo1.getId().equals(studentInfo.getId())) {
return "Fail 学号重复! 请重新输入学号";
......
......@@ -33,14 +33,14 @@ public class StudentController {
@PostMapping("add")
public Object add(@RequestBody StudentInfo studentInfo) {
String status = studentInfoService.addStudentInfo(studentInfo);
return status.contains("OK") ? ResponseUtil.ok(status) : ResponseUtil.fail(503, status);
return status.contains("OK") ? ResponseUtil.ok(status) : ResponseUtil.fail(301, status);
}
@PostMapping("update")
public Object update(@RequestBody StudentInfo studentInfo) {
studentInfoService.updateStudentInfo(studentInfo);
return ResponseUtil.ok("OK");
String status = studentInfoService.updateStudentInfo(studentInfo);
return status.contains("OK") ? ResponseUtil.ok(status) : ResponseUtil.fail(301, status);
}
@PostMapping("batchDeleted")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment