package com.admin.major.service.impl;

import com.admin.major.domain.MajorApply;
import com.admin.major.domain.dto.MajorApplyViewDTO;
import com.admin.major.mapper.EnhanceMajorApplyMapper;
import com.admin.major.service.IEnhanceMajorApplyService;
import org.springframework.stereotype.Service;

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

@Service
public class EnhanceMajorApplyServiceImpl implements IEnhanceMajorApplyService {

    @Resource
    private EnhanceMajorApplyMapper enhanceMajorApplyMapper;


    @Override
    public MajorApplyViewDTO viewMajorApply(MajorApply majorApply) {
        return enhanceMajorApplyMapper.viewMajorApply(majorApply)
                .stream()
                .findFirst()
                .orElse(null);
    }

    @Override
    public List<MajorApplyViewDTO> viewMajorApplyList(MajorApply majorApply) {
        return enhanceMajorApplyMapper.viewMajorApply(majorApply);
    }
}

