|
@@ -1009,6 +1009,49 @@
|
|
|
where id_=1
|
|
|
</update>
|
|
|
|
|
|
+ <update id="batchUpdate">
|
|
|
+ <foreach collection="classGroups" item="classGroup" separator=";">
|
|
|
+ UPDATE class_group
|
|
|
+ <set>
|
|
|
+ <if test="classGroup.subjectIdList != null">
|
|
|
+ subject_id_list_ = #{classGroup.subjectIdList},
|
|
|
+ </if>
|
|
|
+ <if test="classGroup.studentNum != null">
|
|
|
+ student_num_ = #{classGroup.studentNum},
|
|
|
+ </if>
|
|
|
+ update_time_ = NOW(),
|
|
|
+ <if test="classGroup.musicGroupId != null">
|
|
|
+ music_group_id_ = #{classGroup.musicGroupId},
|
|
|
+ </if>
|
|
|
+ <if test="classGroup.type != null">
|
|
|
+ type_ = #{classGroup.type,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},
|
|
|
+ </if>
|
|
|
+ <if test="classGroup.groupType != null">
|
|
|
+ group_type_ = #{classGroup.groupType,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},
|
|
|
+ </if>
|
|
|
+ <if test="classGroup.name != null">
|
|
|
+ name_ = #{classGroup.name},
|
|
|
+ </if>
|
|
|
+ <if test="classGroup.expectStudentNum != null">
|
|
|
+ expect_student_num_ = #{classGroup.expectStudentNum},
|
|
|
+ </if>
|
|
|
+ <if test="classGroup.totalClassTimes != null">
|
|
|
+ total_class_times_ = #{classGroup.totalClassTimes},
|
|
|
+ </if>
|
|
|
+ <if test="classGroup.currentClassTimes!=null">
|
|
|
+ current_class_times_=#{classGroup.currentClassTimes},
|
|
|
+ </if>
|
|
|
+ <if test="classGroup.img!=null">
|
|
|
+ img_=#{classGroup.img},
|
|
|
+ </if>
|
|
|
+ <if test="classGroup.delFlag != null">
|
|
|
+ del_flag_ = #{classGroup.delFlag},
|
|
|
+ </if>
|
|
|
+ </set>
|
|
|
+ WHERE id_ = #{classGroup.id}
|
|
|
+ </foreach>
|
|
|
+ </update>
|
|
|
+
|
|
|
<resultMap id="SuperClassGroupInfo" type="com.ym.mec.biz.dal.dto.SuperClassGroupDto" extends="ClassGroup">
|
|
|
|
|
|
</resultMap>
|
|
@@ -1115,4 +1158,10 @@
|
|
|
</foreach>
|
|
|
AND cg.group_type_ = 'VIP'
|
|
|
</select>
|
|
|
+ <select id="findClassGroupWithIds" resultMap="ClassGroup">
|
|
|
+ SELECT * FROM class_group WHERE id_ IN
|
|
|
+ <foreach collection="classGroupIds" item="classGroupId" open="(" close=")" separator=",">
|
|
|
+ #{classGroupId}
|
|
|
+ </foreach>
|
|
|
+ </select>
|
|
|
</mapper>
|