package com.yijia.integral.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.yijia.integral.mapper.CustomerPointsMapper;
import com.yijia.integral.domain.CustomerPoints;
import com.yijia.integral.service.ICustomerPointsService;

/**
 * 用户积分Service业务层处理
 * 
 * @author yijia
 * @date 2021-02-24
 */
@Service
public class CustomerPointsServiceImpl implements ICustomerPointsService 
{
    @Autowired
    private CustomerPointsMapper customerPointsMapper;

    /**
     * 查询用户积分
     * 
     * @param id 用户积分ID
     * @return 用户积分
     */
    @Override
    public CustomerPoints selectCustomerPointsById(Long id)
    {
        return customerPointsMapper.selectCustomerPointsById(id);
    }

    /**
     * 查询用户积分列表
     * 
     * @param customerPoints 用户积分
     * @return 用户积分
     */
    @Override
    public List<CustomerPoints> selectCustomerPointsList(CustomerPoints customerPoints)
    {
        return customerPointsMapper.selectCustomerPointsList(customerPoints);
    }

    /**
     * 新增用户积分
     * 
     * @param customerPoints 用户积分
     * @return 结果
     */
    @Override
    public int insertCustomerPoints(CustomerPoints customerPoints)
    {
        return customerPointsMapper.insertCustomerPoints(customerPoints);
    }

    /**
     * 修改用户积分
     * 
     * @param customerPoints 用户积分
     * @return 结果
     */
    @Override
    public int updateCustomerPoints(CustomerPoints customerPoints)
    {
        return customerPointsMapper.updateCustomerPoints(customerPoints);
    }

    /**
     * 批量删除用户积分
     * 
     * @param ids 需要删除的用户积分ID
     * @return 结果
     */
    @Override
    public int deleteCustomerPointsByIds(Long[] ids)
    {
        return customerPointsMapper.deleteCustomerPointsByIds(ids);
    }

    /**
     * 删除用户积分信息
     * 
     * @param id 用户积分ID
     * @return 结果
     */
    @Override
    public int deleteCustomerPointsById(Long id)
    {
        return customerPointsMapper.deleteCustomerPointsById(id);
    }
}
