|
|
@@ -1,12 +1,17 @@
|
|
|
package com.smart.reader.controller;
|
|
|
|
|
|
import com.smart.reader.common.Page;
|
|
|
+import com.smart.reader.common.R;
|
|
|
+import com.smart.reader.enums.SuccessResultCode;
|
|
|
import com.smart.reader.exception.CustomException;
|
|
|
import com.smart.reader.model.bo.StudentInfoAddBo;
|
|
|
import com.smart.reader.model.bo.StudentInfoUpdateBo;
|
|
|
import com.smart.reader.model.vo.StudentInfoVo;
|
|
|
+import com.smart.reader.model.vo.SysUserInfoVo;
|
|
|
import com.smart.reader.service.StudentInfoService;
|
|
|
import io.swagger.annotations.Api;
|
|
|
+import io.swagger.annotations.ApiImplicitParam;
|
|
|
+import io.swagger.annotations.ApiImplicitParams;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
import org.springframework.validation.annotation.Validated;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
@@ -23,10 +28,15 @@ public class StudentInfoController {
|
|
|
@Resource
|
|
|
private StudentInfoService studentInfoService;
|
|
|
|
|
|
- @GetMapping("/list")
|
|
|
- @ApiOperation("分页查询学生信息")
|
|
|
- public Page<StudentInfoVo> queryInfo(int pageNum, int pageSize) throws CustomException {
|
|
|
- return studentInfoService.queryInfo(pageNum, pageSize);
|
|
|
+ @GetMapping("queryInfo")
|
|
|
+ @ApiOperation("获取学生列表")
|
|
|
+ @ApiImplicitParams({
|
|
|
+ @ApiImplicitParam(name = "pageNum", value = "当前⻚", required = true, dataType = "int", defaultValue = "1"),
|
|
|
+ @ApiImplicitParam(name = "pageSize", value = "⻚⼤⼩", required = true, dataType = "int", defaultValue = "10"),
|
|
|
+ })
|
|
|
+ public R<Page<StudentInfoVo>> queryInfo(int pageNum, int pageSize) throws CustomException {
|
|
|
+ Page<StudentInfoVo> result = studentInfoService.queryInfo(pageNum, pageSize);
|
|
|
+ return R.success(SuccessResultCode.SUCCESS.getCode(), SuccessResultCode.SUCCESS.getMsg(), result);
|
|
|
}
|
|
|
|
|
|
@PostMapping("/add")
|