package com.lightinit.hsdatashow.mapper;

import com.lightinit.hsdatashow.entity.StWaterConsumer;
import com.lightinit.hsdatashow.entity.StWaterConsumerExample;
import java.util.List;

import com.lightinit.hsdatashow.model.topic.water.NameAndValueModel;
import com.lightinit.hsdatashow.model.topic.water.RegionAndConsumption;
import com.lightinit.hsdatashow.model.topic.water.STChartModel;
import org.apache.ibatis.annotations.Param;

public interface StWaterConsumerMapper {
    long countByExample(StWaterConsumerExample example);

    int deleteByExample(StWaterConsumerExample example);

    int deleteByPrimaryKey(Long id);

    int insert(StWaterConsumer record);

    int insertSelective(StWaterConsumer record);

    List<StWaterConsumer> selectByExample(StWaterConsumerExample example);

    StWaterConsumer selectByPrimaryKey(Long id);

    int updateByExampleSelective(@Param("record") StWaterConsumer record, @Param("example") StWaterConsumerExample example);

    int updateByExample(@Param("record") StWaterConsumer record, @Param("example") StWaterConsumerExample example);

    int updateByPrimaryKeySelective(StWaterConsumer record);

    int updateByPrimaryKey(StWaterConsumer record);

    List<NameAndValueModel> getWaterConsumer(@Param("regionName") String regionName);

    List<RegionAndConsumption> getWaterUser(@Param("month") int month,@Param("year") int year);

    List<RegionAndConsumption> getAreaWaterUser(@Param("year")int year,@Param("month") int month,@Param("regionName") String regionName);

    List<NameAndValueModel> getWaterUserConstitute();

    List<NameAndValueModel> getYesterdayUsers(@Param("year")int year,@Param("month") int month, @Param("day")int day);

    List<NameAndValueModel> getYesterdayQXYSGC(@Param("year")int year,@Param("month") int month, @Param("day")int day);

    List<STChartModel> getYesterdayGHYYS(@Param("year")int year, @Param("month") int month, @Param("day")int day);

    List<NameAndValueModel> getMonthYS(@Param("year")int year, @Param("month") int month);

    List<NameAndValueModel> getMonthQXYSGC(@Param("year")int year, @Param("month") int month);

    List<STChartModel> getMonthGHYYS(@Param("year")int year, @Param("month") int month);
}