ee.tenant_id_ = #{tenantId} and teacher_id_ = #{teacherId} and music_group_id_ = #{musicGroupId} and title_ like '%' #{title} '%' and batch_no_ = #{batchNo} AND FIND_IN_SET(o.id_, #{organIdList}) AND date(ee.create_time_) >= #{assignStartTime} AND date(ee.create_time_) <= #{assignEndTime} AND eer.music_score_id_ IS NOT NULL AND eer.music_score_id_ != '' AND (eer.music_score_id_ IS NULL OR eer.music_score_id_ = '') and ee.group_type_ = #{type} and (su.real_name_ like '%' #{search} '%' or mg.name_ like '%' #{search} '%') and ee.group_type_ = #{type} and ee.id_ = #{studentExerciseId} and ee.music_group_id_ is null and ee.music_group_id_ is not null INSERT INTO extracurricular_exercises (music_group_id_,teacher_id_,student_id_list_,batch_no_, title_,attachments_,content_,expire_date_,completed_num_,expect_num_, create_time_,update_time_,tenant_id_,group_type_) VALUES(#{musicGroupId},#{teacherId},#{studentIdList},#{batchNo},#{title},#{attachments}, #{content},#{expireDate},#{completedNum},#{expectNum},NOW(), NOW(),#{tenantId},#{groupType}) UPDATE extracurricular_exercises student_id_list_ = #{studentIdList}, expire_date_ = #{expireDate}, batch_no_ = #{batchNo}, music_group_id_ = #{musicGroupId}, teacher_id_ = #{teacherId}, title_ = #{title}, expect_num_ = #{expectNum}, content_ = #{content}, attachments_ = #{attachments}, completed_num_ = #{completedNum}, version_tag_ = #{versionTag}, update_time_ = NOW() WHERE id_ = #{id} and tenant_id_ = #{tenantId} DELETE FROM extracurricular_exercises WHERE id_ = #{id} tenant_id_ = #{tenantId} AND teacher_id_ = #{teacherId} AND DATE_FORMAT(create_time_, '%Y-%m') = DATE_FORMAT(#{createTime}, '%Y-%m') create_time_ BETWEEN #{startTime} AND #{endTime} AND id_ = -1 AND expire_date_ >= NOW() AND expire_date_ < NOW() AND id_ = #{courseScheduleId} and teacher_id_ = #{teacherId} and group_type_ = #{type} and version_tag_ = #{versionTag} and music_group_id_ = #{musicGroupId} UPDATE extracurricular_exercises SET completed_num_ = ifnull(completed_num_,0) + 1 WHERE id_ = #{courseHomeworkId} UPDATE extracurricular_exercises SET push_flag_ = 1 WHERE id_ in #{item}