package com.zcxk.rmcp.core.dao;

import com.zcxk.rmcp.core.entity.Device;
import com.zcxk.rmcp.core.entity.MeterReadRecord;

import java.util.Date;
import java.util.List;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

/**
 * @author linqingwei
 * @date 2021-08-12 10:33
 */
@Mapper
public interface MeterReadRecordMapper {
    int insertSelective(MeterReadRecord record);

    int updateByPrimaryKeySelective(MeterReadRecord record);

    int batchInsert(@Param("list") List<MeterReadRecord> list);

    int todayReadRateJobHandler(@Param("readDate") Date readDay);

    int yesterdayReadRate(@Param("readDate") Integer readDate);

    int recent7daysReadRate(@Param("readDate") Integer readDate);

    int lastMonthReadRate(@Param("readDate") Integer readDate);

    int updateTodayReadRate(@Param("device") Device device, @Param("readDate") Date readDate);
}