src/com/cms/dao/CourseDao.xml
(开头部分) 7KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
<?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.cms.dao.CourseDao">
<resultMap id="BaseResultMap" type="com.cms.entity.Course">
<id column="id" jdbcType="INTEGER" property="id" />
<result column="start_date" jdbcType="DATE" property="startDate" />
<result column="end_date" jdbcType="DATE" property="endDate" />
<result column="class_hour" jdbcType="SMALLINT" property="classHour" />
<result column="test_mode" jdbcType="VARCHAR" property="testMode" />
<result column="student_num" jdbcType="INTEGER" property="studentNum" />
<result column="choice_num" jdbcType="INTEGER" property="choiceNum" />
<result column="courseName" jdbcType="VARCHAR" property="courseName" />
<result column="base_course_id" jdbcType="INTEGER" property="baseCourseId" />
<result column="t_id" jdbcType="INTEGER" property="tId" />
<result column="teacherName" jdbcType="VARCHAR" property="teacherName" />
</resultMap>
<sql id="Base_Column_List">
id, start_date, end_date, class_hour, test_mode, student_num, choice_num, t_id, base_course_id
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from t_course
where id = #{id,jdbcType=INTEGER}
</select>
<select id="getTotalItemsCountBySid" resultType="java.lang.Integer">
select count(*)
from t_course as C, t_teacher as T, t_base_course as B
<where>
C.base_course_id = B.id and C.t_id = T.id and start_date > CURRENT_DATE
<if test="param2 != null and param2 != '' ">
and(
(B.name like CONCAT('%',#{param2},'%') )
or (T.name like CONCAT('%',#{param2},'%') )
)
</if>
and C.complete = 0
and C.id
<if test="param1 == 1 ">
not
</if>
in ( select c_id
from t_score, t_student as S
where S.id= #{param3} and S.id = t_score.s_id )
</where>
</select>
<select id="getCourseListBySid" resultMap="BaseResultMap">
select
C.id, start_date, end_date, class_hour, test_mode, student_num,
choice_num, B.name as courseName, T.name as teacherName
from t_course as C, t_teacher as T, t_base_course as B
<where>
C.base_course_id = B.id and C.t_id = T.id and start_date > CURRENT_DATE
<if test="param3 != null and param3 != '' ">
and(
(B.name like CONCAT('%',#{param3},'%') )
后面还有 187 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。