yuanliang преди 1 година
родител
ревизия
c13c6cf700
променени са 1 файла, в които са добавени 10 реда и са изтрити 0 реда
  1. 10 0
      cooleshow-app/src/main/java/com/yonge/cooleshow/admin/controller/StudentController.java

+ 10 - 0
cooleshow-app/src/main/java/com/yonge/cooleshow/admin/controller/StudentController.java

@@ -232,4 +232,14 @@ public class StudentController extends BaseController {
         studentService.save(student);
         return succeed();
     }
+
+    @PostMapping("/update")
+    @ApiOperation(value = "修改", notes = "传入Student")
+    public HttpResponseResult<Boolean> update(@Validated @RequestBody StudentWrapper.Student student) {
+        if (student.getId() == null) {
+            throw new BizException("id 不能为空");
+        }
+        studentService.save(student);
+        return succeed();
+    }
 }