|
@@ -0,0 +1,77 @@
|
|
|
+package com.lantone.security.web;
|
|
|
+
|
|
|
+import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
+import com.lantone.common.api.CommonResult;
|
|
|
+import com.lantone.common.dto.AbnormalLogDTO;
|
|
|
+import com.lantone.common.dto.LoginLogDTO;
|
|
|
+import com.lantone.common.dto.OperationLogDTO;
|
|
|
+import com.lantone.common.vo.GetAbnormalLogVO;
|
|
|
+import com.lantone.common.vo.GetLoginLogVO;
|
|
|
+import com.lantone.common.vo.GetOperationLogVO;
|
|
|
+import com.lantone.dblayermbg.facade.AbnormalLogFacade;
|
|
|
+import com.lantone.dblayermbg.facade.LoginLogFacade;
|
|
|
+import com.lantone.dblayermbg.facade.OperationLogFacade;
|
|
|
+import io.swagger.annotations.Api;
|
|
|
+import io.swagger.annotations.ApiOperation;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.web.bind.annotation.PostMapping;
|
|
|
+import org.springframework.web.bind.annotation.RequestBody;
|
|
|
+import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
+import org.springframework.web.bind.annotation.RequestParam;
|
|
|
+import org.springframework.web.bind.annotation.RestController;
|
|
|
+
|
|
|
+import java.util.List;
|
|
|
+
|
|
|
+/**
|
|
|
+ * @Description: 日志管理API
|
|
|
+ * @author: cy
|
|
|
+ * @time: 2021/9/06 13:51
|
|
|
+ */
|
|
|
+@RestController
|
|
|
+@Api(value = "日志管理API", tags = { "日志管理API" })
|
|
|
+@RequestMapping("/logManage")
|
|
|
+public class LogManagementController {
|
|
|
+ @Autowired
|
|
|
+ private LoginLogFacade loginLogFacade;
|
|
|
+ @Autowired
|
|
|
+ private OperationLogFacade operationLogFacade;
|
|
|
+ @Autowired
|
|
|
+ private AbnormalLogFacade abnormalLogFacade;
|
|
|
+
|
|
|
+ @ApiOperation(value = "查看登录日志[by:cy]")
|
|
|
+ @PostMapping("/getLoginLog")
|
|
|
+ public CommonResult<IPage<LoginLogDTO>> getLoginLog(@RequestBody GetLoginLogVO getLoginLogVO) {
|
|
|
+ return CommonResult.success(loginLogFacade.getLoginLog(getLoginLogVO));
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation(value = "查看登录日志登录用户|登录ip地址[by:cy]")
|
|
|
+ @PostMapping("/getLoginLogNameAndIp")
|
|
|
+ public CommonResult<List<String>> getLoginLogNameAndIp(@RequestBody GetLoginLogVO getLoginLogVO) {
|
|
|
+ return CommonResult.success(loginLogFacade.getLoginLogNameAndIp(getLoginLogVO));
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation(value = "查看操作日志[by:cy]")
|
|
|
+ @PostMapping("/getOperationLog")
|
|
|
+ public CommonResult<IPage<OperationLogDTO>> getOperationLog(@RequestBody GetOperationLogVO getOperationLogVO) {
|
|
|
+ return CommonResult.success(operationLogFacade.getOperationLog(getOperationLogVO));
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation(value = "查看操作日志操作用户[by:cy]")
|
|
|
+ @PostMapping("/getOperationLogName")
|
|
|
+ public CommonResult<List<String>> getOperationLogName(@RequestParam String operationName) {
|
|
|
+ return CommonResult.success(operationLogFacade.getOperationLogName(operationName));
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation(value = "查看异常日志[by:cy]")
|
|
|
+ @PostMapping("/getAbnormalLog")
|
|
|
+ public CommonResult<IPage<AbnormalLogDTO>> getAbnormalLog(@RequestBody GetAbnormalLogVO getAbnormalLogVO) {
|
|
|
+ return CommonResult.success(abnormalLogFacade.getAbnormalLog(getAbnormalLogVO));
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation(value = "查看异常日志请求方式|ip地址[by:cy]")
|
|
|
+ @PostMapping("/getAbnormalLogWayAndIp")
|
|
|
+ public CommonResult<List<String>> getAbnormalLogWayAndIp(@RequestBody GetAbnormalLogVO getAbnormalLogVO) {
|
|
|
+ return CommonResult.success(abnormalLogFacade.getAbnormalLogWayAndIp(getAbnormalLogVO));
|
|
|
+ }
|
|
|
+
|
|
|
+}
|