package com.game.business.mapper;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.game.business.domain.FinTranRecord;
import com.game.business.dto.FinTranDto;
import com.game.business.dto.FinTranRecordDTO;
import com.game.business.vo.FinTranVo;

/**
 * 消费记录Mapper接口
 *
 * @author game
 * @date 2024-06-18
 */
public interface FinTranRecordMapper extends BaseMapper<FinTranRecord> {
    /**
     * 查询消费记录
     *
     * @param id 消费记录主键
     * @return 消费记录
     */
    public FinTranRecord selectFinTranRecordById(Long id);

    /**
     * 查询消费记录列表
     *
     * @param finTranRecord 消费记录
     * @return 消费记录集合
     */
    public List<FinTranRecord> selectFinTranRecordList(FinTranRecord finTranRecord);

    /**
     * 新增消费记录
     *
     * @param finTranRecord 消费记录
     * @return 结果
     */
    public int insertFinTranRecord(FinTranRecord finTranRecord);

    /**
     * 修改消费记录
     *
     * @param finTranRecord 消费记录
     * @return 结果
     */
    public int updateFinTranRecord(FinTranRecord finTranRecord);

    /**
     * 删除消费记录
     *
     * @param id 消费记录主键
     * @return 结果
     */
    public int deleteFinTranRecordById(Long id);

    /**
     * 批量删除消费记录
     *
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteFinTranRecordByIds(Long[] ids);

    Long nextId();

    Map<String, BigDecimal> getRechargeSum(Long userId);

    Map<String, BigDecimal> getExchangeSum(Long userId);

    BigDecimal getWithdrawSum(Long userId);

    List<Map<String, Object>> getWithdrawByDateSum(FinTranRecordDTO finTranRecordDTO);

    List<Map<String, Object>> getRechargeByDateSum(FinTranRecordDTO finTranRecordDTO);

    List<FinTranVo> selectTranList(FinTranDto finTranDto);
}