56 lines
2.3 KiB
XML
56 lines
2.3 KiB
XML
<?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.roomroot.jwgl.mapper.KCBZMapper">
|
|
|
|
<!-- 课程标准结果映射 -->
|
|
<resultMap id="BaseResultMap" type="com.roomroot.jwgl.entity.KCBZ">
|
|
<result column="编号" property="bh"/>
|
|
<result column="课编号" property="kbh"/>
|
|
<result column="名称" property="mc"/>
|
|
<result column="适用专业" property="syzy"/>
|
|
<result column="课次数" property="kcs"/>
|
|
<result column="备注" property="bz"/>
|
|
<result column="执行人编号" property="zxrbh"/>
|
|
<result column="执行时间" property="zxsj"/>
|
|
<result column="执行状态" property="zxzt"/>
|
|
<result column="上报状态" property="sbzt"/>
|
|
<result column="上报时间" property="sbsj"/>
|
|
<result column="上报人编号" property="sbrbh"/>
|
|
<result column="撤回原因" property="chyy"/>
|
|
<result column="正文" property="zw"/>
|
|
<result column="JSONZD" property="jsonzd"/>
|
|
</resultMap>
|
|
|
|
<!-- 查询列 -->
|
|
<sql id="Base_Column_List">
|
|
编号, 课编号, 名称, 适用专业, 课次数, 备注, 执行人编号, 执行时间,
|
|
执行状态, 上报状态, 上报时间, 上报人编号, 撤回原因, 正文, JSONZD
|
|
</sql>
|
|
|
|
<!-- 分页查询(支持按课编号精确、名称和适用专业模糊匹配) -->
|
|
<select id="selectPageList" resultMap="BaseResultMap">
|
|
SELECT *
|
|
FROM 课程标准
|
|
WHERE 撤回原因 IS NULL
|
|
<if test="kcbz.kbh != null and kcbz.kbh != ''">
|
|
AND 课编号 = #{kcbz.kbh}
|
|
</if>
|
|
<if test="kcbz.mc != null and kcbz.mc != ''">
|
|
AND 名称 LIKE CONCAT('%', #{kcbz.mc}, '%')
|
|
</if>
|
|
<if test="kcbz.syzy != null and kcbz.syzy != ''">
|
|
AND 适用专业 LIKE CONCAT('%', #{kcbz.syzy}, '%')
|
|
</if>
|
|
ORDER BY 课编号, 编号
|
|
</select>
|
|
|
|
<!-- 查询某课程的所有版本 -->
|
|
<select id="selectVersionsByCourse" resultMap="BaseResultMap">
|
|
SELECT <include refid="Base_Column_List"/>
|
|
FROM 课程标准
|
|
WHERE 课编号 = #{kbh}
|
|
ORDER BY 编号 DESC
|
|
</select>
|
|
|
|
</mapper>
|