package com.fdkankan.manage.controller;

import com.alibaba.fastjson.JSON;
import com.fdkankan.common.response.ResultData;
import com.fdkankan.manage.bean.MenuBean;
import com.fdkankan.manage.entity.Agent;
import com.fdkankan.manage.entity.OperLog;
import com.fdkankan.manage.service.IAgentService;
import com.fdkankan.manage.service.OperLogService;
import com.fdkankan.manage.vo.OperLogPageParamVO;
import com.fdkankan.mongodb.base.BaseRequestMongo;
import com.fdkankan.mongodb.base.MongoPageResult;
import com.fdkankan.redis.constant.RedisKey;
import com.fdkankan.redis.util.RedisUtil;
import java.util.List;
import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.PageRequest;
import org.springframework.data.domain.Pageable;
import org.springframework.data.domain.Sort;
import org.springframework.data.domain.Sort.Direction;
import org.springframework.data.mongodb.core.MongoTemplate;
import org.springframework.data.mongodb.core.query.Criteria;
import org.springframework.data.mongodb.core.query.Query;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

/**
 * <p>
 * TODO
 * </p>
 *
 * @author dengsixing
 * @since 2022/5/27
 **/
@RestController
@RequestMapping("/service/manage/operLog")
public class OperLogController {

    @Autowired
    MongoTemplate mongoTemplate;

    @Autowired
    RedisUtil redisUtil;

    @Autowired
    private OperLogService operLogService;

    /**
     * 操作日志列表
     * @param param
     * @return
     */
    @PostMapping("/pageOperLog")
    public ResultData pageOperLog(@RequestBody OperLogPageParamVO param){

        MongoPageResult mongoPageResult = operLogService.pageOperLog(param);

        return ResultData.ok(mongoPageResult);

    }




}
