13693261870
7 天以前 b8d62de41ff7e1e0549061308aa11f68cf881ed9
se-system/src/main/java/com/terra/system/controller/all/SignController.java
@@ -16,11 +16,12 @@
import com.terra.system.service.sys.OperateService;
import com.terra.system.service.sys.TokenService;
import com.terra.system.service.sys.UserService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.Parameters;
import javax.annotation.Resource;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.servlet.ModelAndView;
@@ -32,7 +33,7 @@
 * @author WWW
 * @date   2022-09-21
 */
@Api(tags = "运维管理\\签名管理")
@Tag(name = "运维管理\\签名管理")
@RestController
@RequestMapping("/sign")
public class SignController extends BaseController {
@@ -58,7 +59,7 @@
    private ScheduleService scheduleService;
    @SysLog()
    @ApiOperation(value = "跳转首页")
    @Operation(summary = "跳转首页")
    @GetMapping({"/", "/toIndex"})
    public ModelAndView toIndex(ModelAndView mv, HttpServletRequest req) {
        mv.setViewName("index");
@@ -72,7 +73,7 @@
    }
    @SysLog()
    @ApiOperation(value = "跳转登录页")
    @Operation(summary = "跳转登录页")
    @GetMapping("/toLogin")
    public ModelAndView toLogin(ModelAndView mv) {
        mv.setViewName("login");
@@ -81,7 +82,7 @@
    }
    @SysLog()
    @ApiOperation(value = "数据库监控")
    @Operation(summary = "数据库监控")
    @GetMapping(value = "/toDruid")
    public ModelAndView toDruid(HttpServletRequest req, HttpServletResponse res) {
        ModelAndView mv = new ModelAndView();
@@ -103,7 +104,7 @@
    }
    @SysLog()
    @ApiOperation(value = "资源监控")
    @Operation(summary = "资源监控")
    @GetMapping(value = "/toMonitor")
    public ModelAndView toMonitor(ModelAndView mv, HttpServletRequest req, HttpServletResponse res) {
        try {
@@ -121,9 +122,9 @@
    }
    @SysLog()
    @ApiOperation(value = "登录")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "user", value = "用戶名", dataType = "UsersEntity", paramType = "body", example = "")
    @Operation(summary = "登录")
    @Parameters({
            @Parameter(name = "user", description = "用戶名", example = "")
    })
    @PostMapping(value = "/login", produces = "application/json; charset=UTF-8")
    public ResponseMsg<TokenEntity> login(@RequestBody UserEntity user, HttpServletRequest req, HttpServletResponse res) {
@@ -168,7 +169,7 @@
    }
    @SysLog()
    @ApiOperation(value = "登出")
    @Operation(summary = "登出")
    @GetMapping(value = "/logout")
    public ResponseMsg<Boolean> logout(HttpServletRequest req, HttpServletResponse res) {
        try {
@@ -186,7 +187,7 @@
    }
    @SysLog()
    @ApiOperation(value = "检查是/否登录")
    @Operation(summary = "检查是/否登录")
    @GetMapping("/check")
    public ResponseMsg<Boolean> check(HttpServletRequest req, HttpServletResponse res) {
        try {
@@ -205,7 +206,7 @@
    }
    @SysLog()
    @ApiOperation(value = "获取当前用户")
    @Operation(summary = "获取当前用户")
    @GetMapping("/getCurrentUser")
    public ResponseMsg<UserEntity> getCurrentUser(HttpServletRequest req) {
        try {
@@ -221,7 +222,7 @@
    }
    @SysLog()
    @ApiOperation(value = "获取RSA加密公钥")
    @Operation(summary = "获取RSA加密公钥")
    @GetMapping("/getPublicKey")
    public ResponseMsg<String> getPublicKey() {
        try {
@@ -233,7 +234,7 @@
        }
    }
    @ApiOperation(value = "插入操作日志")
    @Operation(summary = "插入操作日志")
    @GetMapping("/insertOpLog")
    public ResponseMsg<Object> insertOpLog(String m1, String m2, HttpServletRequest req) {
        try {