package com.fs.crm.service.impl;

import com.fs.crm.domain.CrmCustomerExt;
import com.fs.crm.mapper.CrmCustomerExtMapper;
import com.fs.crm.service.ICrmCustomerExtService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 客户字段扩展Service业务层处理
 *
 * @author fs
 * @date 2023-03-14
 */
@Service
public class CrmCustomerExtServiceImpl implements ICrmCustomerExtService
{
    @Autowired
    private CrmCustomerExtMapper crmCustomerExtMapper;

    /**
     * 查询客户字段扩展
     *
     * @param extId 客户字段扩展ID
     * @return 客户字段扩展
     */
    @Override
    public CrmCustomerExt selectCrmCustomerExtById(Long extId)
    {
        return crmCustomerExtMapper.selectCrmCustomerExtById(extId);
    }

    /**
     * 查询客户字段扩展列表
     *
     * @param crmCustomerExt 客户字段扩展
     * @return 客户字段扩展
     */
    @Override
    public List<CrmCustomerExt> selectCrmCustomerExtList(CrmCustomerExt crmCustomerExt)
    {
        return crmCustomerExtMapper.selectCrmCustomerExtList(crmCustomerExt);
    }

    /**
     * 新增客户字段扩展
     *
     * @param crmCustomerExt 客户字段扩展
     * @return 结果
     */
    @Override
    public int insertCrmCustomerExt(CrmCustomerExt crmCustomerExt)
    {
        return crmCustomerExtMapper.insertCrmCustomerExt(crmCustomerExt);
    }

    /**
     * 修改客户字段扩展
     *
     * @param crmCustomerExt 客户字段扩展
     * @return 结果
     */
    @Override
    public int updateCrmCustomerExt(CrmCustomerExt crmCustomerExt)
    {
        return crmCustomerExtMapper.updateCrmCustomerExt(crmCustomerExt);
    }

    /**
     * 批量删除客户字段扩展
     *
     * @param extIds 需要删除的客户字段扩展ID
     * @return 结果
     */
    @Override
    public int deleteCrmCustomerExtByIds(Long[] extIds)
    {
        return crmCustomerExtMapper.deleteCrmCustomerExtByIds(extIds);
    }

    /**
     * 删除客户字段扩展信息
     *
     * @param extId 客户字段扩展ID
     * @return 结果
     */
    @Override
    public int deleteCrmCustomerExtById(Long extId)
    {
        return crmCustomerExtMapper.deleteCrmCustomerExtById(extId);
    }
}
