package com.gameplatform.server.mapper.admin;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.gameplatform.server.model.entity.admin.OperationLog;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface OperationLogMapper extends BaseMapper<OperationLog> {
    OperationLog findById(@Param("id") Long id);
    
    int insert(OperationLog operationLog);
    
    List<OperationLog> findByCodeNo(@Param("codeNo") String codeNo,
                                   @Param("size") int size,
                                   @Param("offset") int offset);
    
    long countByCodeNo(@Param("codeNo") String codeNo);
    
    List<OperationLog> findByActorId(@Param("actorId") Long actorId,
                                    @Param("size") int size,
                                    @Param("offset") int offset);
    
    long countByActorId(@Param("actorId") Long actorId);
    
    List<OperationLog> findByActorType(@Param("actorType") String actorType,
                                      @Param("size") int size,
                                      @Param("offset") int offset);
    
    long countByActorType(@Param("actorType") String actorType);
    
    List<OperationLog> findAll(@Param("size") int size,
                              @Param("offset") int offset);
    
    long countAll();
}
