package com.yc.education.service.impl;

import com.github.pagehelper.PageHelper;
import com.yc.education.mapper.HonorMapper;
import com.yc.education.model.Honor;
import com.yc.education.service.HonorService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * huangpan
 * 2019/9/26
 * energy
 */
@Service
public class HonorServiceImpl extends  BaseService<Honor> implements HonorService {
    @Autowired
    HonorMapper honorMapper;

    @Override
    public List<Honor> getHonor(Integer pageNum,Integer pageSize) {
        PageHelper.startPage(pageNum, pageSize);
        return honorMapper.getHonor();
    }

    @Override
    public Honor getHonorId(Integer id) {
        return honorMapper.getHonorId(id);

    }

    @Override
    public void deleteHonorId(Integer id) {
        honorMapper.deleteByPrimaryKey(id) ;
    }
}
