package com.qmth.teachcloud.common.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.qmth.teachcloud.common.annotation.OperationLogDetail;
import com.qmth.teachcloud.common.bean.result.BasicOperationLogResult;
import com.qmth.teachcloud.common.entity.BasicOperationLog;
import com.qmth.teachcloud.common.entity.SysUser;
import com.qmth.teachcloud.common.enums.log.CustomizedOperationTypeEnum;
import com.qmth.teachcloud.common.enums.log.SystemEnum;

/**
 * @Description: 操作日志记录服务类
 * @Author: CaoZixuan
 * @Date: 2022-2-15
 */
public interface BasicOperationLogService extends IService<BasicOperationLog> {

    /**
     * 操作日志分页查询
     *
     * @param customizedOperationType 自定义日志操作类型
     * @param startTime               创建时间 - 开始
     * @param endTime                 创建时间 - 截止
     * @param operatorName            操作人姓名
     * @param requestUser             请求用户
     * @param pageNumber              分页页数
     * @param pageSize                分页容量
     * @return 分页结果
     */
    IPage<BasicOperationLogResult> findOperationLogPage(CustomizedOperationTypeEnum customizedOperationType, Long startTime, Long endTime, String operatorName, SysUser requestUser, int pageNumber, int pageSize);

    void saveOperateLogWithNoAuth(Long schoolId, Long orgId, Long userId, String detail, CustomizedOperationTypeEnum customizedOperationType, SystemEnum systemType);
}
