| | |
| | | <result property="phaseName" column="phase_name" /> |
| | | <result property="createName" column="create_name" /> |
| | | <result property="period" column="period" /> |
| | | <association property="course" javaType="com.gkhy.exam.system.domain.ExCourse" resultMap="courseResult" /> |
| | | <collection property="totalProgress" ofType="java.math.BigDecimal" select="getTotalProgress" column="{phaseId=phase_id,studentId=student_id}"/> |
| | | <collection property="startTime" ofType="java.time.LocalDateTime" select="getStartTime" column="{phaseId=phase_id,studentId=student_id}"/> |
| | | </resultMap> |
| | | |
| | | <resultMap id="courseResult" type="com.gkhy.exam.system.domain.ExCourse"> |
| | | <id property="id" column="course_id" /> |
| | | <result property="name" column="course_name" /> |
| | | <result property="logo" column="course_logo" /> |
| | | </resultMap> |
| | | |
| | | <insert id="batchInsert" parameterType="java.util.List"> |
| | | insert into ex_phase_student(phase_id,student_id) values |
| | |
| | | </select> |
| | | |
| | | <select id="selectPhaseStudentList" resultMap="ExPhaseStudentResult"> |
| | | select a.*,b.phone as student_phone,b.name as student_name,c.name as phase_name,d.period,e.name as create_name from ex_phase_student a |
| | | select a.*,b.phone as student_phone,b.name as student_name,c.name as phase_name,d.period,e.name as create_name,d.id as course_id,d.logo as course_logo,d.name as course_name from ex_phase_student a |
| | | left join ex_student b on a.student_id=b.id |
| | | left join ex_course_phase c on c.id=a.phase_id |
| | | left join ex_course d on d.id=c.couser_id |
| | | left join sys_user e e.id=a.create_id |
| | | left join ex_course d on d.id=c.course_id |
| | | left join sys_user e on e.id=a.create_id |
| | | <where> |
| | | and c.del_flag=0 and b.del_flag=0 |
| | | <if test="phaseId!=null"> |
| | |
| | | <if test="studentName!=null and studentName!=''"> |
| | | and b.name like concat('%',#{studentName},'%') |
| | | </if> |
| | | <if test="phone!=null and phone!=''"> |
| | | and b.phone like concat('%',#{phone},'%') |
| | | <if test="studentPhone!=null and studentPhone!=''"> |
| | | and b.phone like concat('%',#{studentPhone},'%') |
| | | </if> |
| | | <if test="studentId!=null"> |
| | | and a.student_id=#{studentId} |