package com.admin.major.service.impl;

import com.admin.major.domain.StudentInfo;
import com.admin.major.domain.dto.StudentInfoDTO;
import com.admin.major.mapper.EnhanceStudentInfoMapper;
import com.admin.major.service.IEnhanceStudentInfoService;
import com.admin.major.service.IStudentInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class EnhanceStudentInfoServiceImpl implements IEnhanceStudentInfoService {

    @Resource
    private EnhanceStudentInfoMapper enhanceStudentInfoMapper;

    @Override
    public StudentInfoDTO selectStudentInfoByStudentId(String studentId) {
        return enhanceStudentInfoMapper.selectStudentInfoByStudentId(studentId);
    }

    @Override
    public List<StudentInfoDTO> selectStudentInfoList(StudentInfo studentInfo) {
        return enhanceStudentInfoMapper.selectStudentInfoList(studentInfo);
    }

    @Override
    public void updateStudentMajor(String year, Long collegeId) {
        enhanceStudentInfoMapper.updateStudentMajor(year, collegeId);
    }
}
