package com.iamberry.wechat.service.coupon;

import com.iamberry.wechat.core.entity.coupon.ExchangeItem;
import com.iamberry.wechat.face.coupon.ExchangeItemService;
import com.iamberry.wechat.service.mapper.ExchangeItemMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 *  兑换子表接口
 * @author
 * @Date 2018-12-11
 */
@Service
public class ExchangeItemServiceImpl  implements ExchangeItemService {
    @Autowired
    private ExchangeItemMapper exchangeItemMapper;
    /**
     * 获取集合
     * @param  exchangeItem
     * @return List
     */
    @Override
    public List<ExchangeItem> getExchangeItemList(ExchangeItem  exchangeItem){
        return  exchangeItemMapper.getExchangeItemList(exchangeItem);
    }
    /**
     * 查询单条数据
     * @param  id
     * @return  exchangeItem
     */
    @Override
    public  ExchangeItem  getExchangeItemById(Integer  id){
        return  exchangeItemMapper.getExchangeItemById(id);
    }
    /**
     * 增加数据
     * @param  exchangeItem
     * @return Integer
     */
    @Override
    public  Integer  save(ExchangeItem  exchangeItem){
        return  exchangeItemMapper.save(exchangeItem);
    }
    /**
     * 修改数据
     * @param  exchangeItem
     * @return Integer
     */
    @Override
    public  Integer  update(ExchangeItem  exchangeItem){
        return  exchangeItemMapper.update(exchangeItem);
    }
}