package com.om.controller.admin;


import com.om.entity.dto.SecurityLogQueryPageDTO;
import com.om.entity.po.SecurityLog;
import com.om.entity.vo.SecurityLogQueryPageVO;
import com.om.service.ISecurityLogService;
import com.om.utils.Result;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author bmmx
 * @since 2024-04-27
 */
@RestController
@Api(tags = "安全日志管理")
@RequestMapping("web/security-log")
public class SecurityLogController {

    @Resource
    private ISecurityLogService securityLogService;

    @ApiOperation("分页查询安全日志")
    @PostMapping("getPageList")
    public Result<SecurityLogQueryPageVO> getPageList(@RequestBody SecurityLogQueryPageDTO dto) {
        return securityLogService.getPageList(dto);
    }

    @GetMapping("delete")
    @ApiOperation("根据id删除安全日志")
    private Result delete(@RequestParam("id") Integer id) {
        return Result.ok(securityLogService.removeById(id));
    }


}
