package yangtz.cs.liu.campus.service.impl.teacher;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.common.utils.SecurityUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import yangtz.cs.liu.campus.domain.teacher.TeacherJy;
import yangtz.cs.liu.campus.domain.teacher.TeacherLy;
import yangtz.cs.liu.campus.mapper.teacher.TeacherJyMapper;
import yangtz.cs.liu.campus.mapper.teacher.TeacherLyMapper;
import yangtz.cs.liu.campus.service.teacher.TeacherJyService;
import yangtz.cs.liu.campus.service.teacher.TeacherLyService;

import java.util.List;

@Service
public class TeacherLyImpl extends ServiceImpl<TeacherLyMapper, TeacherLy> implements TeacherLyService {

    @Autowired
    TeacherLyMapper teacherLyMapper;

    @Override
    public List<TeacherLy> queryList1(TeacherLy teacherLy) {
        Long userId = SecurityUtils.getLoginUser().getUser().getUserId();
        teacherLy.setRecipientById(userId);
        return teacherLyMapper.queryList1(teacherLy);
    }
}
