package com.ruoyi.sapCustomer.service.impl;

import com.ruoyi.sapCustomer.domain.SapCustomer;
import com.ruoyi.sapCustomer.mapper.SapCustomerMapper;
import com.ruoyi.sapCustomer.service.ISapCustomerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 客户管理Service业务层处理
 *
 * @author ruoyi
 * @date 2024-03-11
 */
@Service
public class SapCustomerServiceImpl implements ISapCustomerService
{
    @Autowired
    private SapCustomerMapper sapCustomerMapper;

    /**
     * 查询客户管理
     *
     * @param customerId 客户管理主键
     * @return 客户管理
     */
    @Override
    public SapCustomer selectSapCustomerByCustomerId(Long customerId)
    {
        return sapCustomerMapper.selectSapCustomerByCustomerId(customerId);
    }

    /**
     * 查询客户管理列表
     *
     * @param sapCustomer 客户管理
     * @return 客户管理
     */
    @Override
    public List<SapCustomer> selectSapCustomerList(SapCustomer sapCustomer)
    {
        return sapCustomerMapper.selectSapCustomerList(sapCustomer);
    }

    /**
     * 新增客户管理
     *
     * @param sapCustomer 客户管理
     * @return 结果
     */
    @Override
    public int insertSapCustomer(SapCustomer sapCustomer)
    {
        return sapCustomerMapper.insertSapCustomer(sapCustomer);
    }

    /**
     * 修改客户管理
     *
     * @param sapCustomer 客户管理
     * @return 结果
     */
    @Override
    public int updateSapCustomer(SapCustomer sapCustomer)
    {
        return sapCustomerMapper.updateSapCustomer(sapCustomer);
    }

    /**
     * 批量删除客户管理
     *
     * @param customerIds 需要删除的客户管理主键
     * @return 结果
     */
    @Override
    public int deleteSapCustomerByCustomerIds(Long[] customerIds)
    {
        return sapCustomerMapper.deleteSapCustomerByCustomerIds(customerIds);
    }

    /**
     * 删除客户管理信息
     *
     * @param customerId 客户管理主键
     * @return 结果
     */
    @Override
    public int deleteSapCustomerByCustomerId(Long customerId)
    {
        return sapCustomerMapper.deleteSapCustomerByCustomerId(customerId);
    }
}
