|
@@ -18,7 +18,7 @@
|
|
|
<result column="class_group_id_" property="classGroupId" />
|
|
|
<result column="completed_num_" property="completedNum" />
|
|
|
<result column="expect_num_" property="expectNum" />
|
|
|
- <result column="next_class_date_" property="expiryDate" />
|
|
|
+ <result column="expiry_date_" property="expiryDate" />
|
|
|
</resultMap>
|
|
|
|
|
|
<resultMap type="com.ym.mec.biz.dal.dto.CourseHomeworkListDto" id="CourseHomeworkDto">
|
|
@@ -33,7 +33,7 @@
|
|
|
<result column="class_group_name_" property="classGroupName" />
|
|
|
<result column="completed_num_" property="completedNum" />
|
|
|
<result column="expect_num_" property="expectNum" />
|
|
|
- <result column="next_class_date_" property="expiryDate" />
|
|
|
+ <result column="expiry_date_" property="expiryDate" />
|
|
|
<result column="remark_" property="remark" />
|
|
|
<result column="status_" property="status" typeHandler="com.ym.mec.common.dal.CustomEnumTypeHandler"/>
|
|
|
<result column="is_replied_" property="isReplied" typeHandler="com.ym.mec.common.dal.CustomEnumTypeHandler"/>
|
|
@@ -61,47 +61,52 @@
|
|
|
SELECT SEQ_WSDEFINITION_ID.nextval AS ID FROM DUAL
|
|
|
</selectKey>
|
|
|
-->
|
|
|
- INSERT INTO course_homework (id_,group_type_,course_schedule_id_,attachments_,content_,create_time_,update_time_,music_group_id_,class_group_id_,completed_num_,expect_num_) VALUES(#{id},#{groupType,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},#{courseScheduleId},#{attachments},#{content},now(),now(),#{musicGroupId},#{classGroupId},#{completedNum},#{expectNum})
|
|
|
+ INSERT INTO course_homework (id_,group_type_,course_schedule_id_,attachments_,content_,create_time_,update_time_,music_group_id_,class_group_id_,completed_num_,expect_num_,expiry_date_) VALUES(#{id},#{groupType,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},#{courseScheduleId},#{attachments},#{content},now(),now(),#{musicGroupId},#{classGroupId},#{completedNum},#{expectNum},#{expiryDate})
|
|
|
</insert>
|
|
|
|
|
|
<!-- 根据主键查询一条记录 -->
|
|
|
<update id="update" parameterType="com.ym.mec.biz.dal.entity.CourseHomework">
|
|
|
- UPDATE course_homework <set>
|
|
|
- <if test="attachments != null">
|
|
|
- attachments_ = #{attachments},
|
|
|
- </if>
|
|
|
- <if test="id != null">
|
|
|
- id_ = #{id},
|
|
|
- </if>
|
|
|
- <if test="classGroupId != null">
|
|
|
- class_group_id_ = #{classGroupId},
|
|
|
- </if>
|
|
|
- <if test="courseScheduleId != null">
|
|
|
- course_schedule_id_ = #{courseScheduleId},
|
|
|
- </if>
|
|
|
- <if test="completedNum != null">
|
|
|
- completed_num_ = #{completedNum},
|
|
|
- </if>
|
|
|
- <if test="groupType != null">
|
|
|
- group_type_ = #{groupType,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},
|
|
|
- </if>
|
|
|
+ UPDATE course_homework
|
|
|
+ <set>
|
|
|
+ <if test="attachments != null">
|
|
|
+ attachments_ = #{attachments},
|
|
|
+ </if>
|
|
|
+ <if test="id != null">
|
|
|
+ id_ = #{id},
|
|
|
+ </if>
|
|
|
+ <if test="classGroupId != null">
|
|
|
+ class_group_id_ = #{classGroupId},
|
|
|
+ </if>
|
|
|
+ <if test="courseScheduleId != null">
|
|
|
+ course_schedule_id_ = #{courseScheduleId},
|
|
|
+ </if>
|
|
|
+ <if test="completedNum != null">
|
|
|
+ completed_num_ = #{completedNum},
|
|
|
+ </if>
|
|
|
+ <if test="groupType != null">
|
|
|
+ group_type_ = #{groupType,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},
|
|
|
+ </if>
|
|
|
|
|
|
- <if test="expectNum != null">
|
|
|
- expect_num_ = #{expectNum},
|
|
|
- </if>
|
|
|
- <if test="updateTime != null">
|
|
|
- update_time_ = NOW(),
|
|
|
- </if>
|
|
|
- <if test="content != null">
|
|
|
- content_ = #{content},
|
|
|
- </if>
|
|
|
- <if test="musicGroupId != null">
|
|
|
- music_group_id_ = #{musicGroupId},
|
|
|
- </if>
|
|
|
- <if test="createTime != null">
|
|
|
- create_time_ = #{createTime},
|
|
|
- </if>
|
|
|
- </set> WHERE id_ = #{id}
|
|
|
+ <if test="expectNum != null">
|
|
|
+ expect_num_ = #{expectNum},
|
|
|
+ </if>
|
|
|
+ <if test="updateTime != null">
|
|
|
+ update_time_ = NOW(),
|
|
|
+ </if>
|
|
|
+ <if test="content != null">
|
|
|
+ content_ = #{content},
|
|
|
+ </if>
|
|
|
+ <if test="musicGroupId != null">
|
|
|
+ music_group_id_ = #{musicGroupId},
|
|
|
+ </if>
|
|
|
+ <if test="createTime != null">
|
|
|
+ create_time_ = #{createTime},
|
|
|
+ </if>
|
|
|
+ <if test="expiryDate != null">
|
|
|
+ expiry_date_ = #{expiryDate},
|
|
|
+ </if>
|
|
|
+ </set>
|
|
|
+ WHERE id_ = #{id}
|
|
|
</update>
|
|
|
|
|
|
<!-- 根据主键删除一条记录 -->
|
|
@@ -161,7 +166,7 @@
|
|
|
<result property="completedNum" column="completed_num_"/>
|
|
|
<result property="courseScheduleName" column="course_schedule_name_"/>
|
|
|
<result property="totalClassTimes" column="total_class_times_"/>
|
|
|
- <result property="currentClassTimes" column="current_class_times"/>
|
|
|
+ <result property="currentClassTimes" column="current_class_times_"/>
|
|
|
<result property="musicGroupId" column="music_group_id_"/>
|
|
|
<result property="musicGroupName" column="music_group_name_"/>
|
|
|
<result property="createTime" column="create_time_"/>
|
|
@@ -178,6 +183,7 @@
|
|
|
ch.completed_num_,
|
|
|
cs.name_ course_schedule_name_,
|
|
|
cg.total_class_times_,
|
|
|
+ cg.current_class_times_,
|
|
|
cg.music_group_id_,
|
|
|
mg.name_ music_group_name_
|
|
|
FROM
|