package com.yc.education.service.impl;

import com.github.pagehelper.PageHelper;
import com.yc.education.mapper.TeamMapper;
import com.yc.education.model.Team;
import com.yc.education.service.TeamService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * huangpan
 * 2019/9/26
 * energy
 */
@Service
public class TeamServiceImpl extends  BaseService<Team> implements TeamService {
    @Autowired
    TeamMapper teamMapper;

    @Override
    public List<Team> getTeam( Integer pageNum ,Integer pageSize, String userName) {
        PageHelper.startPage(pageNum, pageSize);
        return teamMapper.getTeam(userName);
    }

    @Override
    public Team getTeamId(Integer id) {
        return teamMapper.getTeamId(id);
    }

    @Override
    public void deleteTeamId(Integer id) {
    teamMapper.deleteByPrimaryKey(id);
    }
}
