package com.yc.education.service.impl;

import com.github.pagehelper.PageHelper;
import com.yc.education.mapper.TechnologyMapper;
import com.yc.education.model.Technology;
import com.yc.education.service.TechnologyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * huangpan
 * 2019/10/8
 * energy
 */
@Service
public class TechnologyServiceImpl  extends BaseService<Technology> implements TechnologyService {
    @Autowired
    TechnologyMapper technologyMapper;

    @Override
    public List<Technology> selectAllTechnology(Integer pageNum, Integer pageSize,String titleName) {
        PageHelper.startPage(pageNum, pageSize);
        return technologyMapper.selectAllTechnology(titleName);
    }

    @Override
    public Technology selectTechnologyById(int id) {
        return technologyMapper.selectTechnologyById(id);
    }

    @Override
    public void deleteTechnologyById(int id) {
        technologyMapper.deleteByPrimaryKey(id);
    }

    @Override
    public List<Technology> iconTechnology() {
        return technologyMapper.iconTechnology();
    }

    @Override
    public List<Technology> tTechnology() {
        return technologyMapper.tTechnology();
    }
}
