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.IntegralOrderMapper;
import com.yijia.integral.domain.IntegralOrder;
import com.yijia.integral.service.IIntegralOrderService;

/**
 * 积分消费订单Service业务层处理
 * 
 * @author yijia
 * @date 2021-02-24
 */
@Service
public class IntegralOrderServiceImpl implements IIntegralOrderService 
{
    @Autowired
    private IntegralOrderMapper integralOrderMapper;

    /**
     * 查询积分消费订单
     * 
     * @param id 积分消费订单ID
     * @return 积分消费订单
     */
    @Override
    public IntegralOrder selectIntegralOrderById(Long id)
    {
        return integralOrderMapper.selectIntegralOrderById(id);
    }

    /**
     * 查询积分消费订单列表
     * 
     * @param integralOrder 积分消费订单
     * @return 积分消费订单
     */
    @Override
    public List<IntegralOrder> selectIntegralOrderList(IntegralOrder integralOrder)
    {
        return integralOrderMapper.selectIntegralOrderList(integralOrder);
    }

    /**
     * 新增积分消费订单
     * 
     * @param integralOrder 积分消费订单
     * @return 结果
     */
    @Override
    public int insertIntegralOrder(IntegralOrder integralOrder)
    {
        return integralOrderMapper.insertIntegralOrder(integralOrder);
    }

    /**
     * 修改积分消费订单
     * 
     * @param integralOrder 积分消费订单
     * @return 结果
     */
    @Override
    public int updateIntegralOrder(IntegralOrder integralOrder)
    {
        return integralOrderMapper.updateIntegralOrder(integralOrder);
    }

    /**
     * 批量删除积分消费订单
     * 
     * @param ids 需要删除的积分消费订单ID
     * @return 结果
     */
    @Override
    public int deleteIntegralOrderByIds(Long[] ids)
    {
        return integralOrderMapper.deleteIntegralOrderByIds(ids);
    }

    /**
     * 删除积分消费订单信息
     * 
     * @param id 积分消费订单ID
     * @return 结果
     */
    @Override
    public int deleteIntegralOrderById(Long id)
    {
        return integralOrderMapper.deleteIntegralOrderById(id);
    }
}
