package com.iamberry.wechat.service.integral;

import com.iamberry.wechat.core.entity.integral.IntegralItem;
import com.iamberry.wechat.face.integral.IntegralItemService;
import com.iamberry.wechat.service.mapper.IntegralItemMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 *  销售订单项表接口
 * @author ys
 * @Date 2018-04-28
 */
@Service
public class IntegralItemServiceImpl  implements IntegralItemService {
    @Autowired
    private IntegralItemMapper integralItemMapper;
    /**
     * 获取集合
     * @param  integralItem
     * @return List
     */
    @Override
    public List<IntegralItem> getIntegralItemList(IntegralItem  integralItem){
        return  integralItemMapper.getIntegralItemList(integralItem);
    }

    /**
     * 查询单条数据
     * @param  id
     * @return  integralItem
     */
    @Override
    public  IntegralItem  getIntegralItemById(Integer  id){
        return  integralItemMapper.getIntegralItemById(id);
    }

    /**
     * 增加数据
     * @param  integralItem
     * @return Integer
     */
    @Override
    public  Integer  save(IntegralItem  integralItem){
        return  integralItemMapper.save(integralItem);
    }

    /**
     * 修改数据
     * @param  integralItem
     * @return Integer
     */
    @Override
    public  Integer  update(IntegralItem  integralItem){
        return  integralItemMapper.update(integralItem);
    }

    /**
     * 删除数据
     * @param  id
     * @return Integer
     */
    @Override
    public  Integer  delete(Integer  id){
        return  integralItemMapper.delete(id);
    }

    /**
     * 增加数据 <集合>
     * @param  integralItemList
     * @return Integer
     */
    @Override
    public  Integer  saveList(List<IntegralItem>  integralItemList){
        return  integralItemMapper.saveList(integralItemList);
    }

}