package com.ningdatech.carapi.scheduler.mapper;

import com.ningdatech.carapi.scheduler.entity.VehicleOnlineStatusHour;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 统计车辆上线状态 按小时 Mapper 接口
 * </p>
 *
 * @author PoffyZhang
 * @since 2022-11-29
 */
public interface VehicleOnlineStatusHourMapper extends BaseMapper<VehicleOnlineStatusHour> {

    Integer countTable(@Param("tableName") String tableName);

    VehicleOnlineStatusHour selectOneByTable(@Param("tableName") String tableName, @Param("statusHour") VehicleOnlineStatusHour statusHour);

    Integer createTable(@Param("tableName") String tableName);

    Boolean saveByReqInMonthTable(@Param("tableName") String tableName,@Param("statusHour") VehicleOnlineStatusHour statusHour);

    Boolean updateByReqInMonthTable(@Param("tableName") String tableName,@Param("statusHour") VehicleOnlineStatusHour statusHour);

    List<VehicleOnlineStatusHour> listByTable(@Param("tableName") String tableName,@Param("statusHour") VehicleOnlineStatusHour statusHour);

    Boolean batchSave(@Param("tableName") String tableName, @Param("statusHours")List<VehicleOnlineStatusHour> batchOnlineStatusHourToAdd);
}
