package com.phm.manage.service.impl;

import com.phm.manage.domain.Fleet;
import com.phm.manage.mapper.FleetMapper;
import com.phm.manage.service.IFleetService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 机队信息Service业务层处理
 *
 * @author phm
 * @date 2023-08-22
 */
@Service
public class FleetServiceImpl implements IFleetService {
    @Autowired
    private FleetMapper fleetMapper;

    /**
     * 查询机队信息
     *
     * @param id 机队信息主键
     * @return 机队信息
     */
    @Override
    public Fleet selectFleetById(Long id) {
        return fleetMapper.selectFleetById(id);
    }

    /**
     * 查询机队信息列表
     *
     * @param fleet 机队信息
     * @return 机队信息
     */
    @Override
    public List<Fleet> selectFleetList(Fleet fleet) {
        return fleetMapper.selectFleetList(fleet);
    }

    /**
     * 新增机队信息
     *
     * @param fleet 机队信息
     * @return 结果
     */
    @Override
    public int insertFleet(Fleet fleet) {
        return fleetMapper.insertFleet(fleet);
    }

    /**
     * 修改机队信息
     *
     * @param fleet 机队信息
     * @return 结果
     */
    @Override
    public int updateFleet(Fleet fleet) {
        return fleetMapper.updateFleet(fleet);
    }

    /**
     * 批量删除机队信息
     *
     * @param ids 需要删除的机队信息主键
     * @return 结果
     */
    @Override
    public int deleteFleetByIds(Long[] ids) {
        return fleetMapper.deleteFleetByIds(ids);
    }

    /**
     * 删除机队信息信息
     *
     * @param id 机队信息主键
     * @return 结果
     */
    @Override
    public int deleteFleetById(Long id) {
        return fleetMapper.deleteFleetById(id);
    }
}
