package com.ningdatech.carapi.safe.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ningdatech.carapi.safe.entity.NdVehicleOverspeedCompany;
import com.ningdatech.carapi.safe.entity.NdVehicleOverspeedWaysection;
import com.ningdatech.carapi.safe.entity.VehicleOverspeedInfo;
import com.ningdatech.carapi.safe.model.dto.OverspeedPageQuery;
import com.ningdatech.carapi.safe.model.po.NdVehicleOverspeedWaysectionPO;
import com.ningdatech.carapi.safe.model.po.VehicleOverspeedCompanyPO;
import com.ningdatech.carapi.safe.model.po.VehicleOverspeedVehiclePO;
import org.apache.ibatis.annotations.Param;

import java.time.LocalDateTime;
import java.util.List;

/**
 * <p>
 * 车辆超速信息表 Mapper 接口
 * </p>
 *
 * @author PoffyZhang
 * @since 2022-11-17
 */
public interface VehicleOverspeedInfoMapper extends BaseMapper<VehicleOverspeedInfo> {

    Long countDailyToll(@Param("regionIds") List<Long> regionIds, @Param("startTime") LocalDateTime todayStart,
                        @Param("endTime") LocalDateTime todayEnd);

    Page<VehicleOverspeedCompanyPO> pageGroupCompany(Page<VehicleOverspeedCompanyPO> page,
                                                     @Param("ov") OverspeedPageQuery overspeedPageQuery);

    Page<VehicleOverspeedVehiclePO> pageGroupVehicle(Page<VehicleOverspeedVehiclePO> page,
                                                     @Param("ov") OverspeedPageQuery overspeedPageQuery);

    Page<NdVehicleOverspeedWaysectionPO> pageGroupWaysection(Page<NdVehicleOverspeedWaysectionPO> page,
                                                           @Param("ov") OverspeedPageQuery overspeedPageQuery);
}
