feat: swagger
This commit is contained in:
@@ -17,6 +17,8 @@ import com.landaiqing.domain.service.StudentDomainService;
|
||||
import com.landaiqing.domain.service.StudentPermissionDomainService;
|
||||
import com.landaiqing.dto.PermissionDTO;
|
||||
import com.landaiqing.dto.StudentDTO;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
@@ -39,6 +41,7 @@ import java.util.Map;
|
||||
@RestController
|
||||
@RequestMapping("/student/")
|
||||
@Slf4j
|
||||
@Api(tags = "学生controller")
|
||||
public class StudentController {
|
||||
@Resource
|
||||
private StudentDomainService studentDomainService;
|
||||
@@ -54,6 +57,7 @@ public class StudentController {
|
||||
* @date: 2024/3/4 23:47
|
||||
*/
|
||||
@PostMapping("upload")
|
||||
@ApiOperation(value = "上传头像")
|
||||
public Result<Boolean> uploadAvatar(@RequestBody StudentDTO studentDTO) {
|
||||
try {
|
||||
if (log.isInfoEnabled()) {
|
||||
@@ -77,6 +81,7 @@ public class StudentController {
|
||||
* @date: 2024/3/5 12:03
|
||||
*/
|
||||
@RequestMapping("queryAllStudent")
|
||||
@ApiOperation(value = "分页查询学生")
|
||||
public Result<PageResult<StudentDTO>> queryAllStudent(@RequestBody StudentDTO studentDTO) {
|
||||
try {
|
||||
if (log.isInfoEnabled()) {
|
||||
@@ -101,6 +106,7 @@ public class StudentController {
|
||||
* @date: 2024/3/5 12:03
|
||||
*/
|
||||
@RequestMapping("queryPermission")
|
||||
@ApiOperation(value = "权限查询")
|
||||
public Result<List<PermissionDTO>> queryStudentPermission(@RequestBody StudentDTO studentDTO) {
|
||||
try {
|
||||
if (log.isInfoEnabled()) {
|
||||
@@ -122,6 +128,7 @@ public class StudentController {
|
||||
* zh_CN 中文 http://127.0.0.1:3001/zh_CN
|
||||
*/
|
||||
@GetMapping("/{language}")
|
||||
@ApiOperation(value = "国际化测试")
|
||||
public String test(@PathVariable String language) {
|
||||
|
||||
String text2 = MessageUtil.get("sutdent_center", language);
|
||||
@@ -136,6 +143,7 @@ public class StudentController {
|
||||
* @date: 2024/3/5 17:28
|
||||
*/
|
||||
@RequestMapping("login")
|
||||
@ApiOperation(value = "登录")
|
||||
public Result<SaTokenInfo> login(@RequestBody StudentDTO studentDTO) {
|
||||
try {
|
||||
if (log.isInfoEnabled()) {
|
||||
|
Reference in New Issue
Block a user