|
|
@ -3,6 +3,8 @@ package com.aiprose.mbp.controller; |
|
|
|
import com.aiprose.mbp.entity.User; |
|
|
|
import com.aiprose.mbp.service.UserService; |
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
|
|
|
import io.swagger.annotations.Api; |
|
|
|
import io.swagger.annotations.ApiOperation; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.web.bind.annotation.GetMapping; |
|
|
|
import org.springframework.web.bind.annotation.RestController; |
|
|
@ -10,6 +12,7 @@ import org.springframework.web.bind.annotation.RestController; |
|
|
|
import java.util.List; |
|
|
|
|
|
|
|
@RestController |
|
|
|
@Api(tags = "用户接口-用户信息相关") |
|
|
|
public class UserController { |
|
|
|
@Autowired |
|
|
|
private UserService userService; |
|
|
@ -25,6 +28,8 @@ public class UserController { |
|
|
|
public List<User> user() { |
|
|
|
return userService.list(); |
|
|
|
} |
|
|
|
|
|
|
|
@ApiOperation(value = "分页") |
|
|
|
@GetMapping("page") |
|
|
|
public Page<User> page() { |
|
|
|
return userService.page(); |
|
|
|