|
@@ -66,45 +66,47 @@
|
|
|
|
|
|
<!-- 根据主键查询一条记录 -->
|
|
|
<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>
|
|
|
- <if test="expiryDate != null">
|
|
|
- expiry_date_ = #{expiryDate},
|
|
|
- </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>
|
|
|
|
|
|
<!-- 根据主键删除一条记录 -->
|
|
@@ -164,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_"/>
|
|
@@ -181,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
|