|
@@ -0,0 +1,92 @@
|
|
|
+<?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.ym.mec.biz.dal.dao.CourseScheduleStatisticsDao">
|
|
|
+
|
|
|
+ <resultMap type="com.ym.mec.biz.dal.entity.CourseScheduleStatistics" id="CourseScheduleStatistics">
|
|
|
+ <result column="id_" property="id" />
|
|
|
+ <result column="course_schedule_id_" property="courseScheduleId" />
|
|
|
+ <result column="music_group_id_" property="musicGroupId" />
|
|
|
+ <result column="course_student_total_num_" property="courseStudentTotalNum" />
|
|
|
+ <result column="attendance_num_" property="attendanceNum" />
|
|
|
+ <result column="late_num_" property="lateNum" />
|
|
|
+ <result column="standard_num_" property="standardNum" />
|
|
|
+ <result column="homework_flag_" property="homeworkFlag" />
|
|
|
+ <result column="homework_commit_num_" property="homeworkCommitNum" />
|
|
|
+ <result column="service_flag_" property="serviceFlag" />
|
|
|
+ </resultMap>
|
|
|
+
|
|
|
+ <!-- 根据主键查询一条记录 -->
|
|
|
+ <select id="get" resultMap="CourseScheduleStatistics" >
|
|
|
+ SELECT * FROM course_schedule_statistics WHERE id_ = #{id}
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <!-- 全查询 -->
|
|
|
+ <select id="findAll" resultMap="CourseScheduleStatistics">
|
|
|
+ SELECT * FROM course_schedule_statistics ORDER BY id_
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <!-- 向数据库增加一条记录 -->
|
|
|
+ <insert id="insert" parameterType="com.ym.mec.biz.dal.entity.CourseScheduleStatistics" useGeneratedKeys="true" keyColumn="id" keyProperty="id">
|
|
|
+ <!--
|
|
|
+ <selectKey resultClass="int" keyProperty="id" >
|
|
|
+ SELECT SEQ_WSDEFINITION_ID.nextval AS ID FROM DUAL
|
|
|
+ </selectKey>
|
|
|
+ -->
|
|
|
+ INSERT INTO course_schedule_statistics (id_,course_schedule_id_,music_group_id_,course_student_total_num_,attendance_num_,late_num_,standard_num_,homework_flag_,homework_commit_num_,service_flag_) VALUES(#{id},#{courseScheduleId},#{musicGroupId},#{courseStudentTotalNum},#{attendanceNum},#{lateNum},#{standardNum},#{homeworkFlag},#{homeworkCommitNum},#{serviceFlag})
|
|
|
+ </insert>
|
|
|
+
|
|
|
+ <!-- 根据主键查询一条记录 -->
|
|
|
+ <update id="update" parameterType="com.ym.mec.biz.dal.entity.CourseScheduleStatistics">
|
|
|
+ UPDATE course_schedule_statistics <set>
|
|
|
+<if test="homeworkFlag != null">
|
|
|
+homework_flag_ = #{homeworkFlag},
|
|
|
+</if>
|
|
|
+<if test="attendanceNum != null">
|
|
|
+attendance_num_ = #{attendanceNum},
|
|
|
+</if>
|
|
|
+<if test="serviceFlag != null">
|
|
|
+service_flag_ = #{serviceFlag},
|
|
|
+</if>
|
|
|
+<if test="standardNum != null">
|
|
|
+standard_num_ = #{standardNum},
|
|
|
+</if>
|
|
|
+<if test="homeworkCommitNum != null">
|
|
|
+homework_commit_num_ = #{homeworkCommitNum},
|
|
|
+</if>
|
|
|
+<if test="id != null">
|
|
|
+id_ = #{id},
|
|
|
+</if>
|
|
|
+<if test="courseStudentTotalNum != null">
|
|
|
+course_student_total_num_ = #{courseStudentTotalNum},
|
|
|
+</if>
|
|
|
+<if test="courseScheduleId != null">
|
|
|
+course_schedule_id_ = #{courseScheduleId},
|
|
|
+</if>
|
|
|
+<if test="lateNum != null">
|
|
|
+late_num_ = #{lateNum},
|
|
|
+</if>
|
|
|
+<if test="musicGroupId != null">
|
|
|
+music_group_id_ = #{musicGroupId},
|
|
|
+</if>
|
|
|
+</set> WHERE id_ = #{id}
|
|
|
+ </update>
|
|
|
+
|
|
|
+ <!-- 根据主键删除一条记录 -->
|
|
|
+ <delete id="delete" >
|
|
|
+ DELETE FROM course_schedule_statistics WHERE id_ = #{id}
|
|
|
+ </delete>
|
|
|
+
|
|
|
+ <!-- 分页查询 -->
|
|
|
+ <select id="queryPage" resultMap="CourseScheduleStatistics" parameterType="map">
|
|
|
+ SELECT * FROM course_schedule_statistics ORDER BY id_ <include refid="global.limit"/>
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <!-- 查询当前表的总记录数 -->
|
|
|
+ <select id="queryCount" resultType="int">
|
|
|
+ SELECT COUNT(*) FROM course_schedule_statistics
|
|
|
+ </select>
|
|
|
+</mapper>
|