| | |
| | | package com.terra.system.controller.all; |
| | | |
| | | import com.terra.common.controller.all.BaseController; |
| | | import com.terra.system.annotation.SysLog; |
| | | import com.terra.system.config.PropertiesConfig; |
| | | import com.terra.system.entity.all.ResponseMsg; |
| | | import com.terra.common.entity.all.ResponseMsg; |
| | | import com.terra.system.entity.all.SettingData; |
| | | import com.terra.system.entity.all.StaticData; |
| | | import com.terra.common.entity.all.StaticData; |
| | | import com.terra.system.entity.sys.LoginEntity; |
| | | import com.terra.system.entity.sys.OperateEntity; |
| | | import com.terra.system.entity.sys.TokenEntity; |
| | |
| | | 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; |
| | | |
| | |
| | | * @author WWW |
| | | * @date 2022-09-21 |
| | | */ |
| | | @Api(tags = "运维管理\\签名管理") |
| | | @Tag(name = "运维管理\\签名管理") |
| | | @RestController |
| | | @RequestMapping("/sign") |
| | | public class SignController extends BaseController { |
| | |
| | | private ScheduleService scheduleService; |
| | | |
| | | @SysLog() |
| | | @ApiOperation(value = "跳转首页") |
| | | @Operation(summary = "跳转首页") |
| | | @GetMapping({"/", "/toIndex"}) |
| | | public ModelAndView toIndex(ModelAndView mv, HttpServletRequest req) { |
| | | mv.setViewName("index"); |
| | |
| | | } |
| | | |
| | | @SysLog() |
| | | @ApiOperation(value = "跳转登录页") |
| | | @Operation(summary = "跳转登录页") |
| | | @GetMapping("/toLogin") |
| | | public ModelAndView toLogin(ModelAndView mv) { |
| | | mv.setViewName("login"); |
| | |
| | | } |
| | | |
| | | @SysLog() |
| | | @ApiOperation(value = "数据库监控") |
| | | @Operation(summary = "数据库监控") |
| | | @GetMapping(value = "/toDruid") |
| | | public ModelAndView toDruid(HttpServletRequest req, HttpServletResponse res) { |
| | | ModelAndView mv = new ModelAndView(); |
| | |
| | | } |
| | | |
| | | @SysLog() |
| | | @ApiOperation(value = "资源监控") |
| | | @Operation(summary = "资源监控") |
| | | @GetMapping(value = "/toMonitor") |
| | | public ModelAndView toMonitor(ModelAndView mv, HttpServletRequest req, HttpServletResponse res) { |
| | | try { |
| | |
| | | } |
| | | |
| | | @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) { |
| | |
| | | } |
| | | |
| | | @SysLog() |
| | | @ApiOperation(value = "登出") |
| | | @Operation(summary = "登出") |
| | | @GetMapping(value = "/logout") |
| | | public ResponseMsg<Boolean> logout(HttpServletRequest req, HttpServletResponse res) { |
| | | try { |
| | |
| | | } |
| | | |
| | | @SysLog() |
| | | @ApiOperation(value = "检查是/否登录") |
| | | @Operation(summary = "检查是/否登录") |
| | | @GetMapping("/check") |
| | | public ResponseMsg<Boolean> check(HttpServletRequest req, HttpServletResponse res) { |
| | | try { |
| | |
| | | } |
| | | |
| | | @SysLog() |
| | | @ApiOperation(value = "获取当前用户") |
| | | @Operation(summary = "获取当前用户") |
| | | @GetMapping("/getCurrentUser") |
| | | public ResponseMsg<UserEntity> getCurrentUser(HttpServletRequest req) { |
| | | try { |
| | |
| | | } |
| | | |
| | | @SysLog() |
| | | @ApiOperation(value = "获取RSA加密公钥") |
| | | @Operation(summary = "获取RSA加密公钥") |
| | | @GetMapping("/getPublicKey") |
| | | public ResponseMsg<String> getPublicKey() { |
| | | try { |
| | |
| | | } |
| | | } |
| | | |
| | | @ApiOperation(value = "插入操作日志") |
| | | @Operation(summary = "插入操作日志") |
| | | @GetMapping("/insertOpLog") |
| | | public ResponseMsg<Object> insertOpLog(String m1, String m2, HttpServletRequest req) { |
| | | try { |