package com.yc.education.service.impl;

import com.github.pagehelper.PageHelper;
import com.yc.education.mapper.HistoryMapper;
import com.yc.education.model.History;
import com.yc.education.service.HistoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * huangpan
 * 2019/9/26
 * energy
 */
@Service
public class HistoryServiceImpl extends  BaseService<History> implements HistoryService {
    @Autowired
    HistoryMapper historyMapper;

    @Override
    public List<History> getHistory(Integer pageNum, Integer pageSize) {
        PageHelper.startPage(pageNum, pageSize);
        return historyMapper.getHistory();
    }

    @Override
    public History getHistoryId(Integer id) {
        return historyMapper.getHistoryId(id);
    }

    @Override
    public History getHistoryd() {
        return historyMapper.getHistoryd();
    }

    @Override
    public void deleteHistoryd(Integer id) {
        historyMapper.deleteByPrimaryKey(id);
    }

    @Override
    public List<History> getHistoryTime() {
        return historyMapper.getHistoryTime();
    }
}
