package com.srs.web.controller.dormitory;


import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.srs.common.core.controller.BaseController;
import com.srs.common.core.domain.AjaxResult;
import com.srs.common.core.page.TableDataInfo;
import com.srs.dormitory.domain.DmsOperLog;
import com.srs.dormitory.service.IDmsOperLogService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * <p>
 * 宿舍操作日志记录 前端控制器
 * </p>
 *
 * @author szz
 * @since 2023年07月27日
 */
@Api(tags = "宿舍管理系统日志信息")
@RestController
@RequestMapping("/dormitory/dms-oper-log")
public class DmsOperLogController extends BaseController {
    @Autowired
    private IDmsOperLogService dmsOperLogService;

    @ApiOperation("查看日志列表")
    @GetMapping("/list")
    public TableDataInfo getList(){
        startPage();
        List<DmsOperLog> list = dmsOperLogService.list();
        return getDataTable(list);
    }
    @ApiOperation("批量删除日志列表")
    @PostMapping("/batch/delete")
    public AjaxResult batchDelete(@RequestBody List<Long> ids){
        boolean b = dmsOperLogService.removeBatchByIds(ids);
        return toAjax(b);
    }
}

