package com.pwt.web.mapper;

import java.util.List;

import com.pwt.web.domain.ChangePowerModel;
import com.pwt.web.domain.ExchangeStatistics;
import com.pwt.web.domain.PwtChangeBatteryRecord;
import org.apache.ibatis.annotations.Param;

/**
 * 换电记录Mapper接口
 * 
 * @author linyun
 * @date 2022-11-17
 */
public interface PwtChangeBatteryRecordMapper 
{
    /**
     * 查询换电记录
     * 
     * @param recordId 换电记录ID
     * @return 换电记录
     */
    public PwtChangeBatteryRecord selectPwtChangeBatteryRecordById(Long recordId);

    /**
     * 查询换电记录列表
     * 
     * @param pwtChangeBatteryRecord 换电记录
     * @return 换电记录集合
     */
    public List<PwtChangeBatteryRecord> selectPwtChangeBatteryRecordList(PwtChangeBatteryRecord pwtChangeBatteryRecord);

    /**
     * 新增换电记录
     * 
     * @param pwtChangeBatteryRecord 换电记录
     * @return 结果
     */
    public int insertPwtChangeBatteryRecord(PwtChangeBatteryRecord pwtChangeBatteryRecord);

    /**
     * 修改换电记录
     * 
     * @param pwtChangeBatteryRecord 换电记录
     * @return 结果
     */
    public int updatePwtChangeBatteryRecord(PwtChangeBatteryRecord pwtChangeBatteryRecord);

    /**
     * 删除换电记录
     * 
     * @param recordId 换电记录ID
     * @return 结果
     */
    public int deletePwtChangeBatteryRecordById(Long recordId);

    /**
     * 批量删除换电记录
     * 
     * @param recordIds 需要删除的数据ID
     * @return 结果
     */
    public int deletePwtChangeBatteryRecordByIds(Long[] recordIds);

    /**
     * @Description: 查询日换电量/换电次数
     * @Author: linyun
     * @Date: 2022/11/23 15:31
     * @Return:java.util.List<com.pwt.web.domain.ChangePowerModel>
     **/
    public List<ChangePowerModel> getDayDataInfo();

    /**
     * @Description: 查询月换电量/换电次数
     * @Author: linyun
     * @Date: 2022/11/23 15:31
     * @Return:java.util.List<com.pwt.web.domain.ChangePowerModel>
     **/
    public List<ChangePowerModel> getMonthDataInfo();

    /**
     * @Description: 查询年换电量/换电次数
     * @Author: linyun
     * @Date: 2022/11/23 15:31
     * @Return:java.util.List<com.pwt.web.domain.ChangePowerModel>
     **/
    public List<ChangePowerModel> getYearDataInfo();

    public ExchangeStatistics getExchangeStatistics();

    int getChangeCount(@Param("batterySn") String batterySn);

    PwtChangeBatteryRecord getLastestRecord();
}
