package com.bootdo.datas.controller;


import com.bootdo.common.utils.PageUtils;
import com.bootdo.common.utils.Query;

import com.bootdo.datas.dto.ExamineLogDTO;

import com.bootdo.datas.service.ExamineLogService;

import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
import java.util.List;
import java.util.Map;

/**
 * 审核日志Controller层
 * @author lyao
 * 2022-11-20 08:42:11
 */

@Controller
@RequestMapping("/datas/examine-log")
public class ExamineLogController {

    private static Logger log = LoggerFactory.getLogger(ExamineLogController.class);

    @Autowired
    private ExamineLogService examineLogService;

    @ResponseBody
    @GetMapping("/list")
    @RequiresPermissions({ "datas:gyDataImport:data", "datas:dataVerify:data" })
    public PageUtils list(@RequestParam Map<String, Object> params) {
        // 查询列表数据
        Query query = new Query(params);
        List<ExamineLogDTO> dataList = examineLogService.list(query);
        int total = examineLogService.countTotal(query);
        PageUtils pageUtils = new PageUtils(dataList, total);
        return pageUtils;
    }

}
