heheng
10 天以前 9a646862455de8f2c4c77d5fca3d44e23c4c360e
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
package com.gkhy.exam.admin.controller.monitor;
 
import com.gkhy.exam.common.annotation.Log;
import com.gkhy.exam.common.api.CommonResult;
import com.gkhy.exam.common.enums.BusinessType;
import com.gkhy.exam.system.domain.SysOperLog;
import com.gkhy.exam.system.service.SysOperLogService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
 
@Api(tags = "操作日志前端控制器")
@RestController
@RequestMapping("/monitor/operlog")
public class SysOperLogController {
    @Autowired
    private SysOperLogService operLogService;
 
    @ApiOperation(value = "操作日志列表")
    @GetMapping("/list")
    public CommonResult list(SysOperLog operLog){
        return CommonResult.success(operLogService.selectOperLogList(operLog));
    }
 
    @Log(title = "操作日志", businessType = BusinessType.DELETE)
    @ApiOperation(value = "批量删除操作日志")
    @DeleteMapping("/{operIds}")
    public CommonResult remove(@PathVariable Long[] operIds)
    {
        return CommonResult.success(operLogService.deleteOperLogByIds(operIds));
    }
 
    @Log(title = "操作日志", businessType = BusinessType.CLEAN)
    @DeleteMapping("/clean")
    public CommonResult clean()
    {
        operLogService.cleanOperLog();
        return CommonResult.success();
    }
}