package com.ruoyi.ss.meterReadingRecord.mapper;

import com.ruoyi.ss.meterReadingRecord.domain.SmMeterReadingRecord;
import com.ruoyi.ss.meterReadingRecord.domain.SmMeterReadingRecordQuery;
import com.ruoyi.ss.meterReadingRecord.domain.SmMeterReadingRecordVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 抄记录Mapper接口
 *
 * @author ruoyi
 * @date 2024-03-28
 */
public interface SmMeterReadingRecordMapper
{
    /**
     * 查询抄记录
     *
     * @param recordId 抄记录主键
     * @return 抄记录
     */
    public SmMeterReadingRecordVo selectSmMeterReadingRecordByRecordId(Long recordId);

    /**
     * 查询抄记录列表
     *
     * @param smMeterReadingRecord 抄记录
     * @return 抄记录集合
     */
    public List<SmMeterReadingRecordVo> selectSmMeterReadingRecordList(SmMeterReadingRecordQuery smMeterReadingRecord);

    /**
     * 新增抄记录
     *
     * @param smMeterReadingRecord 抄记录
     * @return 结果
     */
    public int insertSmMeterReadingRecord(SmMeterReadingRecord smMeterReadingRecord);

    /**
     * 修改抄记录
     *
     * @param smMeterReadingRecord 抄记录
     * @return 结果
     */
    public int updateSmMeterReadingRecord(SmMeterReadingRecord smMeterReadingRecord);

    /**
     * 删除抄记录
     *
     * @param recordId 抄记录主键
     * @return 结果
     */
    public int deleteSmMeterReadingRecordByRecordId(Long recordId);

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

    int batchInsert(@Param("list") List<? extends SmMeterReadingRecord> recordList);

    /**
     * 查询最后一条数据
     */
    List<SmMeterReadingRecordVo> selectLatest(SmMeterReadingRecordQuery dto);

    /**
     * 查询统计
     */
    List<SmMeterReadingRecordVo> selectCount(SmMeterReadingRecordQuery dto);
}
