package com.ningdatech.carapi.scheduler.mapper;

import java.util.List;
import java.util.Set;

import org.apache.ibatis.annotations.Param;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ningdatech.carapi.scheduler.entity.VehicleOnlineStatusDay;

/**
 * <p>
 * 统计车辆上线状态 按天 Mapper 接口
 * </p>
 *
 * @author PoffyZhang
 * @since 2022-12-18
 */
public interface VehicleOnlineStatusDayMapper extends BaseMapper<VehicleOnlineStatusDay> {
    Integer countTable(@Param("tableName") String tableName);

    VehicleOnlineStatusDay selectOneByTable(@Param("tableName") String tableName, @Param("statusDay") VehicleOnlineStatusDay statusDay);

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

    Boolean saveByReqInMonthTable(@Param("tableName") String tableName,@Param("statusDay") VehicleOnlineStatusDay statusDay);

    Boolean updateByReqInMonthTable(@Param("tableName") String tableName,@Param("statusDay") VehicleOnlineStatusDay statusDay);

    Set<String> selectOnlineCarPlatesInMonthTable(@Param("tableName") String tableName, @Param("date") String date);

    List<VehicleOnlineStatusDay> listByTable(@Param("tableName") String tableName, @Param("statusDay") VehicleOnlineStatusDay statusDay);

    Boolean batchSave(@Param("tableName") String tableName,@Param("statusDays") List<VehicleOnlineStatusDay> statusDays);

    Boolean batchDelete(@Param("tableName") String tableName, @Param("recordIdList") List<Long> recordIdList);
}
