57 lines
2.2 KiB
Java
57 lines
2.2 KiB
Java
package com.hivekion.system.controller;
|
|
|
|
import com.hivekion.common.annotation.AutoLog;
|
|
import com.hivekion.common.entity.PagedResultVo;
|
|
import com.hivekion.common.enums.OperationTypeEnum;
|
|
import com.hivekion.system.domain.vo.sysoperationlog.SysOperationLogModelVo;
|
|
import com.hivekion.system.domain.vo.sysoperationlog.SysOperationLogSearchPageInputVo;
|
|
import com.hivekion.system.domain.vo.sysoperationlog.SysOperationLogViewVo;
|
|
import com.hivekion.system.service.ISysOperationLogService;
|
|
import io.swagger.annotations.Api;
|
|
import io.swagger.annotations.ApiOperation;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.security.access.prepost.PreAuthorize;
|
|
import org.springframework.web.bind.annotation.DeleteMapping;
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
import springfox.documentation.annotations.ApiIgnore;
|
|
|
|
@RestController
|
|
@RequestMapping("/system/log")
|
|
@ApiIgnore
|
|
public class SysOperationLogController {
|
|
|
|
@Autowired
|
|
ISysOperationLogService service;
|
|
|
|
@DeleteMapping("/remove")
|
|
@PreAuthorize("@Permission.hasPermi('pro:sys:log:remove')")
|
|
@AutoLog(value = "操作日志删除", operationType = OperationTypeEnum.DELETE, module = "系统管理/操作日志")
|
|
@ApiOperation("删除操作日志")
|
|
public boolean remove(String operId) {
|
|
return service.remove(operId);
|
|
}
|
|
|
|
@DeleteMapping("/clean")
|
|
@PreAuthorize("@Permission.hasPermi('pro:sys:log:clean')")
|
|
@AutoLog(value = "操作日志清空", operationType = OperationTypeEnum.CLEAN, module = "系统管理/操作日志")
|
|
@ApiOperation("操作日志清空")
|
|
public boolean clean() {
|
|
service.cleanOperationLog();
|
|
return true;
|
|
}
|
|
|
|
@GetMapping("/list")
|
|
@ApiOperation("查询所有操作日志")
|
|
public PagedResultVo<SysOperationLogViewVo> list(SysOperationLogSearchPageInputVo inputVo) {
|
|
return service.list(inputVo);
|
|
}
|
|
|
|
@GetMapping("/getInfo")
|
|
@ApiOperation("获取单条操作日志信息")
|
|
public SysOperationLogModelVo getInfo(String id) {
|
|
return service.getInfo(id);
|
|
}
|
|
}
|