|
@@ -0,0 +1,42 @@
|
|
|
+package com.keao.edu.user.controller;
|
|
|
+
|
|
|
+
|
|
|
+import com.keao.edu.common.controller.BaseController;
|
|
|
+import com.keao.edu.common.entity.HttpResponseResult;
|
|
|
+import com.keao.edu.common.page.PageInfo;
|
|
|
+import com.keao.edu.common.page.QueryInfo;
|
|
|
+import com.keao.edu.user.entity.Student;
|
|
|
+import com.keao.edu.user.service.StudentService;
|
|
|
+import io.swagger.annotations.Api;
|
|
|
+import io.swagger.annotations.ApiOperation;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.security.access.prepost.PreAuthorize;
|
|
|
+import org.springframework.web.bind.annotation.GetMapping;
|
|
|
+import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
+import org.springframework.web.bind.annotation.RestController;
|
|
|
+
|
|
|
+/**
|
|
|
+ * 系统配置控制层
|
|
|
+ */
|
|
|
+@RestController
|
|
|
+@Api(tags = "学员服务")
|
|
|
+@RequestMapping(value = "student")
|
|
|
+public class StudentController extends BaseController {
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private StudentService studentService;
|
|
|
+
|
|
|
+ @ApiOperation(value = "学员列表")
|
|
|
+ @GetMapping(value = "list")
|
|
|
+ @PreAuthorize("@pcs.hasPermissions('teacher/list')")
|
|
|
+ public HttpResponseResult<PageInfo<Student>> list(QueryInfo queryInfo) {
|
|
|
+ return succeed(studentService.queryPage(queryInfo));
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation(value = "查询学员")
|
|
|
+ @GetMapping(value = "get")
|
|
|
+ @PreAuthorize("@pcs.hasPermissions('teacher/get')")
|
|
|
+ public HttpResponseResult<Student> get(Integer id) {
|
|
|
+ return succeed(studentService.get(id));
|
|
|
+ }
|
|
|
+}
|