package com.gameplatform.server.mapper.agent;

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

import java.util.List;

@Mapper
public interface AgentPointsTxMapper extends BaseMapper<AgentPointsTx> {
    AgentPointsTx findById(@Param("id") Long id);
    
    int insert(AgentPointsTx agentPointsTx);
    
    List<AgentPointsTx> findByAccountId(@Param("accountId") Long accountId,
                                       @Param("size") int size,
                                       @Param("offset") int offset);
    
    long countByAccountId(@Param("accountId") Long accountId);
    
    List<AgentPointsTx> findByAccountIdAndType(@Param("accountId") Long accountId,
                                              @Param("type") String type,
                                              @Param("size") int size,
                                              @Param("offset") int offset);
    
    long countByAccountIdAndType(@Param("accountId") Long accountId,
                                @Param("type") String type);
}
