@ -2,12 +2,10 @@ package com.yipin.liuwanr.mapper;
import java.util.List ;
import java.util.List ;
import com.yipin.liuwanr.entity.CourseLink ;
import com.yipin.liuwanr.entity.CourseSchedule ;
import com.yipin.liuwanr.entity.CourseSchedule ;
import com.yipin.liuwanr.vo.CourseAndProjectVo ;
import com.yipin.liuwanr.vo.CourseAndProjectVo ;
import org.apache.ibatis.annotations.Insert ;
import org.apache.ibatis.annotations.* ;
import org.apache.ibatis.annotations.Param ;
import org.apache.ibatis.annotations.Select ;
import org.apache.ibatis.annotations.Update ;
import com.yipin.liuwanr.entity.Project_Management ;
import com.yipin.liuwanr.entity.Project_Management ;
@ -29,7 +27,7 @@ public interface TeacherProjectAndCourseMapper {
// "</script>"})
// "</script>"})
@Select ( "select DISTINCT hpm.projectId,projectName,isOpenProject,isAttendance from hr_project_management hpm left join teacher_project tp on hpm.projectId=tp.projectId " +
@Select ( "select DISTINCT hpm.projectId,projectName,isOpenProject,isAttendance from hr_project_management hpm left join teacher_project tp on hpm.projectId=tp.projectId " +
" where hpm.isdel=0 and tp.courseId=#{courseId} and tp.experimentalClassId=#{experimentalClassId}" )
" where tp.courseId=#{courseId} and tp.experimentalClassId=#{experimentalClassId}" )
List < Project_Management > getBySystemId ( @Param ( "courseId" ) Integer courseId , @Param ( "experimentalClassId" ) Integer experimentalClassId ) ;
List < Project_Management > getBySystemId ( @Param ( "courseId" ) Integer courseId , @Param ( "experimentalClassId" ) Integer experimentalClassId ) ;
@ -63,4 +61,17 @@ public interface TeacherProjectAndCourseMapper {
//添加课程进度
//添加课程进度
@Insert ( "insert into hr_course_schedule (courseId,experimentalClassId,projectId) VALUES (#{courseId},#{experimentalClassId},#{projectId})" )
@Insert ( "insert into hr_course_schedule (courseId,experimentalClassId,projectId) VALUES (#{courseId},#{experimentalClassId},#{projectId})" )
void addCourseSchedule ( CourseSchedule courseSchedule ) ;
void addCourseSchedule ( CourseSchedule courseSchedule ) ;
@Select ( "select DISTINCT hpm.projectId,projectName from hr_project_management hpm left join teacher_project tp on hpm.projectId=tp.projectId " +
" where tp.courseId=#{courseId} and tp.experimentalClassId=#{experimentalClassId}" )
@Results ( {
@Result ( id = true , column = "projectId" , property = "projectId" ) ,
@Result ( column = "projectName" , property = "projectName" ) ,
@Result ( column = "projectId" , property = "courseLinks" , many = @Many ( select = "com.yipin.liuwanr.mapper.TeacherProjectAndCourseMapper.queryCourseLink" ) )
} )
List < Project_Management > queryProjects ( @Param ( "courseId" ) Integer courseId , @Param ( "experimentalClassId" ) Integer experimentalClassId ) ;
@Select ( "select linkName,fileLink from hr_course_link where projectId=#{projectId} and isdel=0 GROUP BY linkId" )
List < CourseLink > queryCourseLink ( Integer projectId ) ;
}
}