feat: 移植工程
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
package com.cxx.home.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaIgnore;
|
||||
import com.cxx.home.service.SessionService;
|
||||
import com.cxx.common.dto.user.SessionDto;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/session")
|
||||
@Tag(name = "会话管理")
|
||||
public class SessionController {
|
||||
@Resource
|
||||
private SessionService sessionService;
|
||||
|
||||
@Operation(summary = "创建会话")
|
||||
@PostMapping("")
|
||||
@SaIgnore
|
||||
public SessionDto createSession(@RequestParam("name") String name,
|
||||
@RequestParam("password") String password) {
|
||||
return sessionService.create(name, password);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user