package com.yc.education.service.impl;/**
 * huangpan
 * 2019/10/16
 * energy
 */

import com.alibaba.druid.filter.AutoLoad;
import com.yc.education.mapper.BannerMapper;
import com.yc.education.model.Banner;
import com.yc.education.service.BannerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 *@ClassName BannerServiceImpl
 *@Description TODO
 *@Author QuZhangJing
 *@Date 2019/10/16 16:12
 *@Version 1.0
 */
@Service
public class BannerServiceImpl extends BaseService<Banner> implements BannerService {
    @Autowired
    BannerMapper bannerMapper;

    @Override
    public List<Banner> getBanner() {
        return bannerMapper.getBanner();
    }

    @Override
    public Banner getBannerById(Integer id) {
        return bannerMapper.getBannerById(id);
    }

    @Override
    public void delBannerById(Integer id) {
    bannerMapper.deleteByPrimaryKey(id);
    }

    @Override
    public List<Banner> selBanner() {
        return bannerMapper.selBanner();
    }
}
