package com.iamberry.wechat.service.coupon;

import com.iamberry.wechat.core.entity.coupon.SalesActivities;
import com.iamberry.wechat.face.coupon.SalesActivitiesService;
import com.iamberry.wechat.service.mapper.SalesActivitiesMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 *  活动表接口
 * @author Administrator
 * @Date 2018-11-30
 */
@Service
public class SalesActivitiesServiceImpl  implements SalesActivitiesService {
    @Autowired
    private SalesActivitiesMapper salesActivitiesMapper;
    /**
     * 获取集合
     * @param  salesActivities
     * @return List
     */
    @Override
    public List<SalesActivities> getSalesActivitiesList(SalesActivities  salesActivities){
        return  salesActivitiesMapper.getSalesActivitiesList(salesActivities);
    }
    /**
     * 查询单条数据
     * @param  id
     * @return  salesActivities
     */
    @Override
    public  SalesActivities  getSalesActivitiesById(Integer  id){
        return  salesActivitiesMapper.getSalesActivitiesById(id);
    }
    /**
     * 增加数据
     * @param  salesActivities
     * @return Integer
     */
    @Override
    public  Integer  save(SalesActivities  salesActivities){
        return  salesActivitiesMapper.save(salesActivities);
    }
    /**
     * 修改数据
     * @param  salesActivities
     * @return Integer
     */
    @Override
    public  Integer  update(SalesActivities  salesActivities){
        return  salesActivitiesMapper.update(salesActivities);
    }
    /**
     * 删除数据
     * @param  id
     * @return Integer
     */
    @Override
    public  Integer  delete(Integer  id){
        return  salesActivitiesMapper.delete(id);
    }
}