package com.dcsoft.system.vehicle.service.impl;

import java.util.List;

import com.dcsoft.system.vehicle.domain.CarChargeItem;
import com.dcsoft.system.vehicle.mapper.CarChargeItemMapper;
import com.dcsoft.system.vehicle.service.ICarChargeItemService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


/**
 * 收费配置子项Service业务层处理
 *
 * @author dcsoft
 * @date 2024-01-24
 */
@Service
public class CarChargeItemServiceImpl implements ICarChargeItemService
{
    @Autowired
    private CarChargeItemMapper carChargeItemMapper;

    /**
     * 查询收费配置子项
     *
     * @param id 收费配置子项主键
     * @return 收费配置子项
     */
    @Override
    public CarChargeItem selectCarChargeItemById(Long id)
    {
        return carChargeItemMapper.selectCarChargeItemById(id);
    }

    /**
     * 查询收费配置子项列表
     *
     * @param carChargeItem 收费配置子项
     * @return 收费配置子项
     */
    @Override
    public List<CarChargeItem> selectCarChargeItemList(CarChargeItem carChargeItem)
    {
        return carChargeItemMapper.selectCarChargeItemList(carChargeItem);
    }

    /**
     * 新增收费配置子项
     *
     * @param carChargeItem 收费配置子项
     * @return 结果
     */
    @Override
    public int insertCarChargeItem(CarChargeItem carChargeItem)
    {
        return carChargeItemMapper.insertCarChargeItem(carChargeItem);
    }

    /**
     * 修改收费配置子项
     *
     * @param carChargeItem 收费配置子项
     * @return 结果
     */
    @Override
    public int updateCarChargeItem(CarChargeItem carChargeItem)
    {
        return carChargeItemMapper.updateCarChargeItem(carChargeItem);
    }

    /**
     * 批量删除收费配置子项
     *
     * @param ids 需要删除的收费配置子项主键
     * @return 结果
     */
    @Override
    public int deleteCarChargeItemByIds(Long[] ids)
    {
        return carChargeItemMapper.deleteCarChargeItemByIds(ids);
    }

    /**
     * 删除收费配置子项信息
     *
     * @param id 收费配置子项主键
     * @return 结果
     */
    @Override
    public int deleteCarChargeItemById(Long id)
    {
        return carChargeItemMapper.deleteCarChargeItemById(id);
    }

    @Override
    public int deleteChargeItemByChargeId(Long id) {
        return carChargeItemMapper.deleteChargeItemByChargeId(id);
    }


}
