<?xml version="1.0" encoding="UTF-8"?>
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
<mapper namespace="com.gkhy.exam.system.mapper.ExExamRecordMapper">
|
<resultMap type="com.gkhy.exam.system.domain.ExExamRecord" id="ExamRecordResult">
|
<result property="id" column="id" />
|
<result property="companyId" column="company_id" />
|
<result property="studentId" column="student_id" />
|
<result property="planName" column="plan_name" />
|
<result property="courseName" column="course_name" />
|
<result property="level" column="level" />
|
<result property="period" column="period" />
|
<result property="actualPeriod" column="actual_period" />
|
<result property="score" column="score" />
|
<result property="companyId" column="company_id" />
|
<result property="passed" column="passed" />
|
<result property="createBy" column="create_by" />
|
<result property="createTime" column="create_time" />
|
<result property="updateBy" column="update_by" />
|
<result property="updateTime" column="update_time" />
|
<result property="remark" column="remark" />
|
<result property="companyName" column="company_name" />
|
</resultMap>
|
|
<sql id="selectExamRecordVo">
|
select a.id, a.company_id, a.student_id, a.plan_name, a.course_name,a.level,a.period,a.actual_period,a.score,
|
a.company_id,a.passed, a.create_by, a.create_time, a.update_by, a.update_time, a.remark,b.name as company_name
|
from ex_exam_record a
|
left join sys_company b on b.id=a.company_id
|
</sql>
|
|
<select id="selectExamRecordList" resultMap="ExamRecordResult">
|
<include refid="selectExamRecordVo"/>
|
<where>
|
<if test="planName != null and planName != ''">
|
AND a.plan_name like concat('%', #{planName}, '%')
|
</if>
|
<if test="companyId != null ">
|
AND a.company_id =#{companyId}
|
</if>
|
</where>
|
order by a.id desc
|
</select>
|
|
<select id="selectExamRecordById" resultMap="ExamRecordResult">
|
<include refid="selectExamRecordVo"/>
|
where a.id=#{recordId}
|
</select>
|
</mapper>
|