package com.njzscloud.supervisory.sys.log.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.njzscloud.supervisory.sys.log.domain.SysLog;
import com.njzscloud.supervisory.sys.log.domain.dto.SysLogQueryCriteria;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author Ljw
 * @date 2025-10-24
 **/
@Mapper
public interface SysLogMapper extends BaseMapper<SysLog> {

    List<SysLog> queryAll(@Param("criteria") SysLogQueryCriteria criteria);

    IPage<SysLog> queryAll(@Param("criteria") SysLogQueryCriteria criteria, IPage<SysLog> page);

    IPage<SysLog> queryAllByUser(@Param("criteria") SysLogQueryCriteria criteria, IPage<SysLog> page);

    String getExceptionDetails(@Param("id") Long id);

    void deleteByLevel(@Param("logType") String logType);
}
