package com.sf.mapper;


import com.sf.entity.Course;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @author WanJl
 * @version 1.0
 * @title CourseMapper
 * @description
 * @create 2025/11/9
 */
public interface CourseMapper {
    /**
     * 根据学生id查询课程信息
     * @param stuId
     * @return
     */
    @Select("SELECT c.id,c.name " +
            "FROM course c,stu_cr sc " +
            "WHERE sc.cid=c.id  AND sc.sid=#{stuId}")
    List<Course> selectByStudentId(Integer stuId);
}
