外卖项目day01-Swagger_介绍和常用注解
This commit is contained in:
@@ -8,6 +8,8 @@ import com.sky.result.Result;
|
||||
import com.sky.service.EmployeeService;
|
||||
import com.sky.utils.JwtUtil;
|
||||
import com.sky.vo.EmployeeLoginVO;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
@@ -23,6 +25,7 @@ import java.util.Map;
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/admin/employee")
|
||||
@Api(tags = "员工相关接口")
|
||||
@Slf4j
|
||||
public class EmployeeController {
|
||||
|
||||
@@ -38,6 +41,7 @@ public class EmployeeController {
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/login")
|
||||
@ApiOperation("员工登录")
|
||||
public Result<EmployeeLoginVO> login(@RequestBody EmployeeLoginDTO employeeLoginDTO) {
|
||||
log.info("员工登录:{}", employeeLoginDTO);
|
||||
|
||||
@@ -67,6 +71,7 @@ public class EmployeeController {
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/logout")
|
||||
@ApiOperation("员工退出")
|
||||
public Result<String> logout() {
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user