package com.ningdatech.carapi.car.trips.service.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ningdatech.carapi.car.trips.entity.VehicleTrips;
import com.ningdatech.carapi.car.trips.entity.VehicleTripsCity;
import com.ningdatech.carapi.car.trips.entity.VehicleTripsCompany;
import com.ningdatech.carapi.car.trips.mapper.VehicleTripsCityMapper;
import com.ningdatech.carapi.car.trips.mapper.VehicleTripsMapper;
import com.ningdatech.carapi.car.trips.model.dto.VehicleTripsParamDTO;
import com.ningdatech.carapi.car.trips.service.IVehicleTripsCityService;
import com.ningdatech.carapi.car.trips.service.IVehicleTripsService;
import lombok.RequiredArgsConstructor;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 车辆单趟记录 服务实现类
 * </p>
 *
 * @author PoffyZhang
 * @since 2022-11-08
 */
@Service
@RequiredArgsConstructor
public class VehicleTripsServiceCityImpl extends ServiceImpl<VehicleTripsCityMapper, VehicleTripsCity> implements IVehicleTripsCityService {

    private final VehicleTripsCityMapper vehicleTripsCityMapper;

    @Override
    public Page<VehicleTripsCity> pageCity(Page<VehicleTripsCity> page, List<Long> regionIds,
                                           String startTime, String endTime) {
        return vehicleTripsCityMapper.pageCity(page,regionIds,startTime,endTime);
    }

    @Override
    public Page<VehicleTripsCity> pageCityGetOn(Page<VehicleTripsCity> page, VehicleTripsParamDTO param) {
        return vehicleTripsCityMapper.pageCityGetOn(page,param);
    }

    @Override
    public Page<VehicleTripsCompany> pageCityGetOnCompany(Page<VehicleTripsCompany> page, VehicleTripsParamDTO param) {
        return vehicleTripsCityMapper.pageCityGetOnCompany(page,param);
    }
}
