package com.iamberry.wechat.service.coupon;

import com.iamberry.wechat.core.entity.coupon.Exchange;
import com.iamberry.wechat.face.coupon.ExchangeService;
import com.iamberry.wechat.service.mapper.ExchangeMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 *  兑换表接口
 * @author
 * @Date 2018-12-11
 */
@Service
public class ExchangeServiceImpl  implements ExchangeService {
    @Autowired
    private ExchangeMapper exchangeMapper;
    /**
     * 获取集合
     * @param  exchange
     * @return List
     */
    @Override
    public List<Exchange> getExchangeList(Exchange  exchange){
        return  exchangeMapper.getExchangeList(exchange);
    }
    /**
     * 查询单条数据
     * @param  id
     * @return  exchange
     */
    @Override
    public  Exchange  getExchangeById(Integer  id){
        return  exchangeMapper.getExchangeById(id);
    }
    /**
     * 增加数据
     * @param  exchange
     * @return Integer
     */
    @Override
    public  Integer  save(Exchange exchange){
        return  exchangeMapper.save(exchange);
    }
    /**
     * 修改数据
     * @param  exchange
     * @return Integer
     */
    @Override
    public  Integer  update(Exchange  exchange){
        return  exchangeMapper.update(exchange);
    }
}