54 lines
2.1 KiB
XML
54 lines
2.1 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.SemesterCalendarMapper">
|
|
|
|
<resultMap id="BaseResultMap" type="com.roomroot.jwgl.entity.XQXLB">
|
|
<id column="编号" property="bh" />
|
|
<result column="年度" property="nd" />
|
|
<result column="假期时间" property="jqsj" />
|
|
<result column="假期名称" property="jqmc" />
|
|
<result column="加粗" property="jc" />
|
|
<result column="备注" property="bz" />
|
|
<result column="可排课" property="kpk" />
|
|
<result column="备注显示" property="bzxs" />
|
|
<result column="自动排课" property="zdpk" />
|
|
<result column="节次" property="courseClass"/>
|
|
</resultMap>
|
|
|
|
<sql id="Base_Column_List">
|
|
编号, 年度, 假期时间, 假期名称, 加粗, 备注, 可排课, 备注显示, 自动排课, 节次
|
|
</sql>
|
|
|
|
<!-- 分页查询 -->
|
|
<select id="selectPageList" resultMap="BaseResultMap">
|
|
SELECT *
|
|
FROM 学期校历表
|
|
<where>
|
|
<if test="xqxlb.nd != null and xqxlb.nd != ''">
|
|
AND 年度 = #{xqxlb.nd}
|
|
</if>
|
|
<if test="xqxlb.kpk != null and xqxlb.kpk != ''">
|
|
AND 可排课 LIKE CONCAT('%', #{xqxlb.kpk}, '%')
|
|
</if>
|
|
<if test="xqxlb.jqsj != null and xqxlb.jqsj != ''">
|
|
AND 假期时间 LIKE CONCAT('%', #{xqxlb.jqsj}, '%')
|
|
</if>
|
|
</where>
|
|
ORDER BY 年度, 假期时间, 节次
|
|
</select>
|
|
|
|
<!-- 根据年度和假期时间范围查询 -->
|
|
<select id="selectByNdAndJqsjRange" resultMap="BaseResultMap">
|
|
SELECT <include refid="Base_Column_List" />
|
|
FROM 学期校历表
|
|
WHERE 年度 = #{nd}
|
|
<if test="jqsjStart != null and jqsjStart != ''">
|
|
<![CDATA[ AND 假期时间 >= #{jqsjStart} ]]>
|
|
</if>
|
|
<if test="jqsjEnd != null and jqsjEnd != ''">
|
|
<![CDATA[ AND 假期时间 <= #{jqsjEnd} ]]>
|
|
</if>
|
|
ORDER BY 假期时间, 节次
|
|
</select>
|
|
|
|
</mapper> |