package com.yijia.customer.service.impl;

import java.util.List;

import com.yijia.customer.domain.CustomerCardSetting;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.yijia.customer.mapper.CustomerCardSettingDetailMapper;
import com.yijia.customer.domain.CustomerCardSettingDetail;
import com.yijia.customer.service.ICustomerCardSettingDetailService;

/**
 * 客户电子会员卡充值优惠设置明细Service业务层处理
 *
 * @author yijia
 * @date 2021-04-06
 */
@Service
public class CustomerCardSettingDetailServiceImpl implements ICustomerCardSettingDetailService
{
    @Autowired
    private CustomerCardSettingDetailMapper customerCardSettingDetailMapper;

    /**
     * 查询客户电子会员卡充值优惠设置明细
     *
     * @param id 客户电子会员卡充值优惠设置明细ID
     * @return 客户电子会员卡充值优惠设置明细
     */
    @Override
    public CustomerCardSettingDetail selectCustomerCardSettingDetailById(Long id)
    {
        return customerCardSettingDetailMapper.selectCustomerCardSettingDetailById(id);
    }

    /**
     * 查询客户电子会员卡充值优惠设置明细列表
     *
     * @param customerCardSettingDetail 客户电子会员卡充值优惠设置明细
     * @return 客户电子会员卡充值优惠设置明细
     */
    @Override
    public List<CustomerCardSettingDetail> selectCustomerCardSettingDetailList(CustomerCardSettingDetail customerCardSettingDetail)
    {
        return customerCardSettingDetailMapper.selectCustomerCardSettingDetailList(customerCardSettingDetail);
    }

    /**
     * 新增客户电子会员卡充值优惠设置明细
     *
     * @param customerCardSettingDetail 客户电子会员卡充值优惠设置明细
     * @return 结果
     */
    @Override
    public int insertCustomerCardSettingDetail(CustomerCardSettingDetail customerCardSettingDetail)
    {
        return customerCardSettingDetailMapper.insertCustomerCardSettingDetail(customerCardSettingDetail);
    }

    /**
     * 修改客户电子会员卡充值优惠设置明细
     *
     * @param customerCardSettingDetail 客户电子会员卡充值优惠设置明细
     * @return 结果
     */
    @Override
    public int updateCustomerCardSettingDetail(CustomerCardSettingDetail customerCardSettingDetail)
    {
        return customerCardSettingDetailMapper.updateCustomerCardSettingDetail(customerCardSettingDetail);
    }

    /**
     * 批量删除客户电子会员卡充值优惠设置明细
     *
     * @param ids 需要删除的客户电子会员卡充值优惠设置明细ID
     * @return 结果
     */
    @Override
    public int deleteCustomerCardSettingDetailByIds(Long[] ids)
    {
        return customerCardSettingDetailMapper.deleteCustomerCardSettingDetailByIds(ids);
    }

    /**
     * 删除客户电子会员卡充值优惠设置明细信息
     *
     * @param id 客户电子会员卡充值优惠设置明细ID
     * @return 结果
     */
    @Override
    public int deleteCustomerCardSettingDetailById(Long id)
    {
        return customerCardSettingDetailMapper.deleteCustomerCardSettingDetailById(id);
    }

    @Override
    public List<CustomerCardSettingDetail> listDetailInfo(CustomerCardSetting customerCardSetting) {
        return customerCardSettingDetailMapper.listDetailInfo(customerCardSetting);
    }
}
