package com.gameplatform.server.mapper.agent;

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

import java.util.List;

@Mapper
public interface LinkBatchMapper extends BaseMapper<LinkBatch> {
    LinkBatch findById(@Param("id") Long id);
    
    int insert(LinkBatch linkBatch);
    
    List<LinkBatch> findByAgentId(@Param("agentId") Long agentId,
                                 @Param("size") int size,
                                 @Param("offset") int offset);
    
    long countByAgentId(@Param("agentId") Long agentId);
    
    List<LinkBatch> findAll(@Param("size") int size,
                           @Param("offset") int offset);
    
    long countAll();
    
    /**
     * 根据ID列表查询批次信息
     */
    List<LinkBatch> findByIds(@Param("ids") List<Long> ids);
}
