package io.renren.dao;


import io.renren.entity.ConsumeRecord;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;
import java.util.Map;

/**
 * 消费记录Mapper接口
 *
 * @author nichun
 * @date 2023-09-08
 */
@Mapper
public interface ConsumeRecordMapper
{
    /**
     * 查询消费记录
     *
     * @param id 消费记录主键
     * @return 消费记录
     */
    public ConsumeRecord selectConsumeRecordById(Long id);

    /**
     * 查询消费记录列表
     *
     * @param consumeRecord 消费记录
     * @return 消费记录集合
     */
    public List<ConsumeRecord> selectConsumeRecordList(ConsumeRecord consumeRecord);

    public List<ConsumeRecord> selectConsumeRecordAllList(ConsumeRecord consumeRecord);

    /**
     * 新增消费记录
     *
     * @param consumeRecord 消费记录
     * @return 结果
     */
    public int insertConsumeRecord(ConsumeRecord consumeRecord);

    /**
     * 修改消费记录
     *
     * @param consumeRecord 消费记录
     * @return 结果
     */
    public int updateConsumeRecord(ConsumeRecord consumeRecord);

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

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

    public ConsumeRecord selectConsumeRecordByOutTradeId(String outTradeId);

    public List<Map<String, Object>> selectConsumeRecordSumonline(String devId);

    public List<Map<String, Object>> selectConsumeRecordSumonlineMonth(String devId);
}
