Browse Source

Merge branch 'master' of http://git.dayaedu.com/yonge/mec

zouxuan 4 years ago
parent
commit
20ba9e0b95

+ 4 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/dao/MusicGroupPaymentCalenderCourseSettingsDao.java

@@ -6,6 +6,7 @@ import com.ym.mec.common.dal.BaseDAO;
 import org.apache.ibatis.annotations.Param;
 
 import java.util.List;
+import java.util.Set;
 
 public interface MusicGroupPaymentCalenderCourseSettingsDao extends BaseDAO<Integer, MusicGroupPaymentCalenderCourseSettings> {
 
@@ -29,6 +30,9 @@ public interface MusicGroupPaymentCalenderCourseSettingsDao extends BaseDAO<Inte
 	MusicGroupPaymentCalenderCourseSettings getWithPaymentCalenderAndCourseType(@Param("calenderId") Long calenderId,
 																				@Param("courseType") CourseSchedule.CourseScheduleType courseType);
 
+	List<MusicGroupPaymentCalenderCourseSettings> getWithPaymentCalendersAndCourseType(@Param("calenderIds") Set<Long> calenderIds,
+																				@Param("courseType") CourseSchedule.CourseScheduleType courseType);
+
 	int deleteByMusicGroupPaymentCalenderId(Long musicGroupPaymentCalenderId);
 
 	/**

+ 23 - 3
mec-biz/src/main/java/com/ym/mec/biz/dal/dao/MusicGroupPaymentStudentCourseDetailDao.java

@@ -11,6 +11,15 @@ import org.apache.ibatis.annotations.Param;
 public interface MusicGroupPaymentStudentCourseDetailDao extends BaseDAO<Long, MusicGroupPaymentStudentCourseDetail> {
 
     /**
+     * @describe 批量更新
+     * @author qnc99
+     * @date 2020/12/1 0001
+     * @param musicGroupPaymentStudentCourseDetails:
+     * @return int
+     */
+    int batchUpdate(@Param("paymentCourseDetails") List<MusicGroupPaymentStudentCourseDetail> musicGroupPaymentStudentCourseDetails);
+
+    /**
      * @param studentId:
      * @param courseType:
      * @param courseMinutes:
@@ -19,10 +28,21 @@ public interface MusicGroupPaymentStudentCourseDetailDao extends BaseDAO<Long, M
      * @author Joburgess
      * @date 2020.11.04
      */
-    MusicGroupPaymentStudentCourseDetail getUnUseWithStudentAndCourseTypeAndCourseMinutes(@Param("musicGroupId") String musicGroupId,
+    List<MusicGroupPaymentStudentCourseDetail> getUnUseWithStudentAndCourseTypeAndCourseMinutes(@Param("batchNo") String batchNo,
                                                                                           @Param("studentId") Integer studentId,
-                                                                                          @Param("courseType") CourseSchedule.CourseScheduleType courseType,
-                                                                                          @Param("courseMinutes") Integer courseMinutes);
+                                                                                          @Param("courseType") CourseSchedule.CourseScheduleType courseType);
+
+    /**
+     * @param studentId:
+     * @param courseType:
+     * @return com.ym.mec.biz.dal.entity.MusicGroupPaymentStudentCourseDetail
+     * @describe 获取指定学员,指定课程类型下的可用缴费批次号
+     * @author Joburgess
+     * @date 2020.11.04
+     */
+    String getUnUseBatchNoWithStudentAndCourseTypeAndCourseMinutes(@Param("musicGroupId") String musicGroupId,
+                                                                   @Param("studentId") Integer studentId,
+                                                                   @Param("courseType") CourseSchedule.CourseScheduleType courseType);
 
     /**
      * @param studentIds:

+ 12 - 4
mec-biz/src/main/java/com/ym/mec/biz/dal/page/EndCourseScheduleQueryInfo.java

@@ -1,10 +1,7 @@
 package com.ym.mec.biz.dal.page;
 
 import com.ym.mec.biz.dal.entity.CourseSchedule;
-import com.ym.mec.biz.dal.enums.ClassGroupTypeEnum;
-import com.ym.mec.biz.dal.enums.CourseStatusEnum;
-import com.ym.mec.biz.dal.enums.GroupType;
-import com.ym.mec.biz.dal.enums.TeachModeEnum;
+import com.ym.mec.biz.dal.enums.*;
 import com.ym.mec.common.page.QueryInfo;
 import io.swagger.annotations.ApiModelProperty;
 
@@ -70,6 +67,9 @@ public class EndCourseScheduleQueryInfo extends QueryInfo {
     @ApiModelProperty(value = "上课模式")
     private TeachModeEnum teachMode;
 
+    @ApiModelProperty(value = "职务类型(助教、主教)")
+    private TeachTypeEnum teachType;
+
     private boolean isExport = false;
 
     public TeachModeEnum getTeachMode() {
@@ -223,4 +223,12 @@ public class EndCourseScheduleQueryInfo extends QueryInfo {
 	public void setCreateEndDate(Date createEndDate) {
 		this.createEndDate = createEndDate;
 	}
+
+    public TeachTypeEnum getTeachType() {
+        return teachType;
+    }
+
+    public void setTeachType(TeachTypeEnum teachType) {
+        this.teachType = teachType;
+    }
 }

+ 34 - 21
mec-biz/src/main/java/com/ym/mec/biz/service/impl/CourseScheduleStudentPaymentServiceImpl.java

@@ -7,7 +7,6 @@ import com.ym.mec.biz.dal.dto.SimpleUserDto;
 import com.ym.mec.biz.dal.dto.VipGroupGiveCourseSortDto;
 import com.ym.mec.biz.dal.entity.*;
 import com.ym.mec.biz.dal.enums.*;
-import com.ym.mec.biz.dal.page.CourseScheduleQueryInfo;
 import com.ym.mec.biz.dal.page.CourseScheduleStudentPaymentQueryInfo;
 import com.ym.mec.biz.service.CourseScheduleStudentPaymentService;
 import com.ym.mec.biz.service.SysUserCashAccountService;
@@ -16,13 +15,9 @@ import com.ym.mec.common.dal.BaseDAO;
 import com.ym.mec.common.exception.BizException;
 import com.ym.mec.common.page.PageInfo;
 import com.ym.mec.common.service.impl.BaseServiceImpl;
-import com.ym.mec.thirdparty.yqpay.DateUtils;
 import com.ym.mec.util.date.DateUtil;
-import org.springframework.beans.BeanUtils;
 import com.ym.mec.util.collection.MapUtil;
-import io.swagger.models.auth.In;
 import org.apache.commons.lang3.StringUtils;
-import org.apache.poi.ss.formula.functions.T;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Isolation;
@@ -327,30 +322,40 @@ public class CourseScheduleStudentPaymentServiceImpl extends BaseServiceImpl<Lon
 			for (Map.Entry<CourseSchedule.CourseScheduleType, List<CourseSchedule>> courseScheduleTypeListEntry : typeCourseMap.entrySet()) {
 				//当前课程类型总课程时长
 				Integer typeCourseDuration = courseTypeCourseDurationMap.get(courseScheduleTypeListEntry.getKey());
-				MusicGroupPaymentStudentCourseDetail musicGroupPaymentStudentCourseDetail = musicGroupPaymentStudentCourseDetailDao.getUnUseWithStudentAndCourseTypeAndCourseMinutes(musicGroupId, studentId, courseScheduleTypeListEntry.getKey(), typeCourseDuration);
-				if(Objects.isNull(musicGroupPaymentStudentCourseDetail)||musicGroupPaymentStudentCourseDetail.getTotalCourseMinutes().compareTo(typeCourseDuration)<0){
+
+				String batchNo = musicGroupPaymentStudentCourseDetailDao.getUnUseBatchNoWithStudentAndCourseTypeAndCourseMinutes(musicGroupId, studentId, courseScheduleTypeListEntry.getKey());
+
+				List<MusicGroupPaymentStudentCourseDetail> musicGroupPaymentStudentCourseDetails = musicGroupPaymentStudentCourseDetailDao.getUnUseWithStudentAndCourseTypeAndCourseMinutes(batchNo, studentId, courseScheduleTypeListEntry.getKey());
+				int totalCourseMinutes = musicGroupPaymentStudentCourseDetails.stream().mapToInt(MusicGroupPaymentStudentCourseDetail::getTotalCourseMinutes).reduce(0, Integer::sum);
+				if(CollectionUtils.isEmpty(musicGroupPaymentStudentCourseDetails)||totalCourseMinutes<typeCourseDuration){
 					SysUser user = teacherDao.getUser(studentId);
 					throw new BizException("{}在{}课程类型上的课程时长不足", user.getUsername(), courseScheduleTypeListEntry.getKey().getMsg());
 				}
 
-				MusicGroupPaymentCalender musicGroupPaymentCalender = musicGroupPaymentCalenderDao.get(musicGroupPaymentStudentCourseDetail.getMusicGroupPaymentCalenderId());
-				if(Objects.isNull(musicGroupPaymentCalender)||!musicGroupId.equals(musicGroupPaymentCalender.getMusicGroupId())){
+				Set<Long> calenderIds = musicGroupPaymentStudentCourseDetails.stream().map(MusicGroupPaymentStudentCourseDetail::getMusicGroupPaymentCalenderId).collect(Collectors.toSet());
+
+				List<MusicGroupPaymentCalender> musicGroupPaymentCalenders = musicGroupPaymentCalenderDao.queryByIds(calenderIds);
+				if(CollectionUtils.isEmpty(musicGroupPaymentCalenders)||musicGroupPaymentCalenders.size()!=calenderIds.size()){
 					throw new BizException("缴费设置异常");
 				}
 
-				MusicGroupPaymentCalenderCourseSettings musicGroupPaymentCalenderCourseSettings = musicGroupPaymentCalenderCourseSettingsDao.getWithPaymentCalenderAndCourseType(musicGroupPaymentStudentCourseDetail.getMusicGroupPaymentCalenderId(), courseScheduleTypeListEntry.getKey());
-				if(Objects.isNull(musicGroupPaymentCalenderCourseSettings)||musicGroupPaymentCalenderCourseSettings.getCourseTotalMinuties().compareTo(musicGroupPaymentStudentCourseDetail.getTotalCourseMinutes())!=0){
+				List<MusicGroupPaymentCalenderCourseSettings> musicGroupPaymentCalenderCourseSettings = musicGroupPaymentCalenderCourseSettingsDao.getWithPaymentCalendersAndCourseType(calenderIds, courseScheduleTypeListEntry.getKey());
+				int originalCourseTotalMinutes = musicGroupPaymentCalenderCourseSettings.stream().mapToInt(MusicGroupPaymentCalenderCourseSettings::getCourseTotalMinuties).reduce(0, Integer::sum);
+				if(Objects.isNull(musicGroupPaymentCalenderCourseSettings)||originalCourseTotalMinutes!=totalCourseMinutes){
 					throw new BizException("缴费设置异常");
 				}
 
-				allBatchNos.add(musicGroupPaymentCalender.getBatchNo());
+				allBatchNos.add(batchNo);
+
+				BigDecimal totalCourseOriginalPrice = musicGroupPaymentCalenderCourseSettings.stream().map(MusicGroupPaymentCalenderCourseSettings::getCourseOriginalPrice).reduce(BigDecimal.ZERO, BigDecimal::add);
+				BigDecimal totalCourseCurrentPrice = musicGroupPaymentCalenderCourseSettings.stream().map(MusicGroupPaymentCalenderCourseSettings::getCourseCurrentPrice).reduce(BigDecimal.ZERO, BigDecimal::add);
 
 				//课程每分钟原价
-				BigDecimal unitMinuteOriginalPrice = musicGroupPaymentCalenderCourseSettings.getCourseOriginalPrice().divide(new BigDecimal(musicGroupPaymentCalenderCourseSettings.getCourseTotalMinuties()), CommonConstants.DECIMAL_PLACE, BigDecimal.ROUND_DOWN);
+				BigDecimal unitMinuteOriginalPrice = totalCourseOriginalPrice.divide(new BigDecimal(originalCourseTotalMinutes), CommonConstants.DECIMAL_PLACE, BigDecimal.ROUND_DOWN);
 				//课程每分钟现价
-				BigDecimal unitMinuteCurrentPrice = musicGroupPaymentCalenderCourseSettings.getCourseCurrentPrice().divide(new BigDecimal(musicGroupPaymentCalenderCourseSettings.getCourseTotalMinuties()), CommonConstants.DECIMAL_PLACE, BigDecimal.ROUND_DOWN);
+				BigDecimal unitMinuteCurrentPrice = totalCourseCurrentPrice.divide(new BigDecimal(originalCourseTotalMinutes), CommonConstants.DECIMAL_PLACE, BigDecimal.ROUND_DOWN);
 
-				if(MusicGroupPaymentCalender.PayUserType.SCHOOL.equals(musicGroupPaymentCalender.getPayUserType())){
+				if(MusicGroupPaymentCalender.PayUserType.SCHOOL.equals(musicGroupPaymentCalenders.get(0).getPayUserType())){
 					unitMinuteCurrentPrice = new BigDecimal("0");
 				}
 
@@ -374,7 +379,7 @@ public class CourseScheduleStudentPaymentServiceImpl extends BaseServiceImpl<Lon
 					cssp.setMusicGroupId(courseSchedule.getMusicGroupId());
 					cssp.setCourseScheduleId(courseSchedule.getId());
 					cssp.setClassGroupId(courseSchedule.getClassGroupId());
-					cssp.setBatchNo(musicGroupPaymentCalender.getBatchNo());
+					cssp.setBatchNo(batchNo);
 					cssp.setUserId(studentId);
 					cssp.setOriginalPrice(courseOriginalPrice);
 					cssp.setExpectPrice(courseCurrentPrice);
@@ -382,13 +387,21 @@ public class CourseScheduleStudentPaymentServiceImpl extends BaseServiceImpl<Lon
 					typeCourseStudentPayments.add(cssp);
 				}
 
-				typeCourseStudentPayments.get(0).setOriginalPrice(typeCourseStudentPayments.get(0).getOriginalPrice().add(musicGroupPaymentCalenderCourseSettings.getCourseOriginalPrice().subtract(typeCourseTotalOriginalPrice)));
-				if(MusicGroupPaymentCalender.PayUserType.STUDENT.equals(musicGroupPaymentCalender.getPayUserType())) {
-					typeCourseStudentPayments.get(0).setExpectPrice(typeCourseStudentPayments.get(0).getExpectPrice().add(musicGroupPaymentCalenderCourseSettings.getCourseCurrentPrice().subtract(typeCourseTotalCurrentPrice)));
+				typeCourseStudentPayments.get(0).setOriginalPrice(typeCourseStudentPayments.get(0).getOriginalPrice().add(totalCourseOriginalPrice.subtract(typeCourseTotalOriginalPrice)));
+				if(MusicGroupPaymentCalender.PayUserType.STUDENT.equals(musicGroupPaymentCalenders.get(0).getPayUserType())) {
+					typeCourseStudentPayments.get(0).setExpectPrice(typeCourseStudentPayments.get(0).getExpectPrice().add(totalCourseCurrentPrice.subtract(typeCourseTotalCurrentPrice)));
 				}
 				courseScheduleStudentPayments.addAll(typeCourseStudentPayments);
-				musicGroupPaymentStudentCourseDetail.setUsedCourseMinutes(typeCourseDuration);
-				musicGroupPaymentStudentCourseDetailDao.update(musicGroupPaymentStudentCourseDetail);
+				for (MusicGroupPaymentStudentCourseDetail musicGroupPaymentStudentCourseDetail : musicGroupPaymentStudentCourseDetails) {
+					if(typeCourseDuration>musicGroupPaymentStudentCourseDetail.getTotalCourseMinutes()){
+						musicGroupPaymentStudentCourseDetail.setUsedCourseMinutes(musicGroupPaymentStudentCourseDetail.getTotalCourseMinutes());
+						typeCourseDuration = typeCourseDuration-musicGroupPaymentStudentCourseDetail.getTotalCourseMinutes();
+					}else{
+						musicGroupPaymentStudentCourseDetail.setUsedCourseMinutes(typeCourseDuration);
+						typeCourseDuration = 0;
+					}
+				}
+				musicGroupPaymentStudentCourseDetailDao.batchUpdate(musicGroupPaymentStudentCourseDetails);
 			}
 		}
 		courseScheduleStudentPaymentDao.batchInsert(courseScheduleStudentPayments);

+ 6 - 1
mec-biz/src/main/resources/config/mybatis/CourseScheduleMapper.xml

@@ -2338,6 +2338,7 @@
             course_schedule cs
             LEFT JOIN school s ON cs.schoole_id_=s.id_
             LEFT JOIN organization o ON cs.organ_id_=o.id_
+            LEFT JOIN course_schedule_teacher_salary csts ON csts.course_schedule_id_ = cs.id_
             left join teacher_attendance ta on ta.course_schedule_id_ = cs.id_ and ta.is_complaints_ = 1
             LEFT JOIN student_attendance sa ON sa.course_schedule_id_ = cs.id_ AND sa.remark_ IS NULL
             <include refid="endFindCourseSchedulesCondition"/>
@@ -2352,6 +2353,7 @@
         FROM
         course_schedule cs
         LEFT JOIN student_attendance sa ON sa.course_schedule_id_ = cs.id_ AND sa.remark_ IS NULL
+        LEFT JOIN course_schedule_teacher_salary csts ON csts.course_schedule_id_ = cs.id_
         <include refid="endFindCourseSchedulesCondition"/>
     </select>
     <select id="findCourseIdsByStudent" resultType="int">
@@ -2446,7 +2448,10 @@
             AND cs.teach_mode_ = #{teachMode,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler}
         </if>
         <if test="teacherIdList != null">
-            AND cs.actual_teacher_id_=#{teacherIdList}
+            AND csts.user_id_=#{teacherIdList}
+        </if>
+        <if test="teachType != null">
+            AND csts.teacher_role_ = #{teachType,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler}
         </if>
         <if test="organIdList!=null">
             AND FIND_IN_SET(cs.organ_id_,#{organIdList})

+ 9 - 0
mec-biz/src/main/resources/config/mybatis/MusicGroupPaymentCalenderCourseSettingsMapper.xml

@@ -113,6 +113,15 @@
 		SELECT * FROM music_group_payment_calender_course_settings WHERE music_group_payment_calender_id_=#{calenderId} AND course_type_=#{courseType,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler}
 	</select>
 
+	<select id="getWithPaymentCalendersAndCourseType" resultMap="MusicGroupPaymentCalenderCourseSettings">
+		SELECT * FROM music_group_payment_calender_course_settings
+		WHERE music_group_payment_calender_id_ IN
+			<foreach collection="calenderIds" item="calenderId" open="(" close=")" separator=",">
+				#{calenderId}
+			</foreach>
+			AND course_type_=#{courseType,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler}
+	</select>
+
 	<delete id="deleteByMusicGroupPaymentCalenderId">
 		DELETE FROM music_group_payment_calender_course_settings WHERE music_group_payment_calender_id_ = #{musicGroupPaymentCalenderId}
 	</delete>

+ 60 - 9
mec-biz/src/main/resources/config/mybatis/MusicGroupPaymentStudentCourseDetailMapper.xml

@@ -85,6 +85,35 @@
         WHERE id_ = #{id}
     </update>
 
+    <update id="batchUpdate"
+            parameterType="com.ym.mec.biz.dal.entity.MusicGroupPaymentStudentCourseDetail">
+        <foreach collection="paymentCourseDetails" item="paymentCourseDetail" separator=";">
+            UPDATE music_group_payment_student_course_detail
+            <set>
+                <if test="paymentCourseDetail.usedCourseMinutes != null">
+                    used_course_minutes_ = #{paymentCourseDetail.usedCourseMinutes},
+                </if>
+                <if test="paymentCourseDetail.totalCourseMinutes != null">
+                    total_course_minutes_ = #{paymentCourseDetail.totalCourseMinutes},
+                </if>
+                <if test="paymentCourseDetail.userId != null">
+                    user_id_ = #{paymentCourseDetail.userId},
+                </if>
+                <if test="paymentCourseDetail.musicGroupPaymentCalenderDetailId != null">
+                    music_group_payment_calender_detail_id_ = #{paymentCourseDetail.musicGroupPaymentCalenderDetailId},
+                </if>
+                <if test="paymentCourseDetail.musicGroupPaymentCalenderId != null">
+                    music_group_payment_calender_id_ = #{paymentCourseDetail.musicGroupPaymentCalenderId},
+                </if>
+                <if test="paymentCourseDetail.courseType != null">
+                    course_type_ = #{paymentCourseDetail.courseType, typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},
+                </if>
+                update_time_ = #{paymentCourseDetail.updateTime}
+            </set>
+            WHERE id_ = #{paymentCourseDetail.id}
+        </foreach>
+    </update>
+
     <!-- 根据主键删除一条记录 -->
     <delete id="delete">
         DELETE
@@ -104,28 +133,50 @@
         SELECT COUNT(*)
         FROM music_group_payment_student_course_detail
     </select>
+
     <select id="getUnUseWithStudentAndCourseTypeAndCourseMinutes" resultMap="MusicGroupPaymentStudentCourseDetail">
         SELECT mgpscd.*
-        FROM music_group_payment_student_course_detail mgpscd
-        LEFT JOIN music_group_payment_calender mgpc ON mgpscd.music_group_payment_calender_id_ = mgpc.id_
+            FROM music_group_payment_student_course_detail mgpscd
+            LEFT JOIN music_group_payment_calender mgpc ON mgpscd.music_group_payment_calender_id_ = mgpc.id_
         WHERE
-          mgpc.music_group_id_ = #{musicGroupId}
+          mgpc.batch_no_ = #{batchNo}
           AND mgpscd.user_id_ = #{studentId}
           AND mgpscd.course_type_ = #{courseType,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler}
-          AND mgpscd.total_course_minutes_ &gt;= #{courseMinutes}
+--           AND mgpscd.total_course_minutes_ &gt;= #{courseMinutes}
           AND mgpscd.used_course_minutes_ &lt;= 0
         ORDER BY mgpscd.id_
         LIMIT 1;
     </select>
+
+    <select id="getUnUseBatchNoWithStudentAndCourseTypeAndCourseMinutes" resultType="string">
+        SELECT
+            mgpc.batch_no_
+        FROM music_group_payment_calender mgpc
+            LEFT JOIN music_group_payment_student_course_detail mgpscd ON mgpscd.music_group_payment_calender_id_ = mgpc.id_
+        WHERE
+            mgpc.music_group_id_ = #{musicGroupId}
+            AND mgpscd.user_id_ = #{studentId}
+            AND mgpscd.course_type_ = #{courseType,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler}
+        GROUP BY mgpc.batch_no_ HAVING SUM(mgpscd.used_course_minutes_) &lt;=0 ORDER BY MIN(mgpc.id_) LIMIT 1;
+    </select>
+
     <select id="getUnUseWithStudents" resultMap="MusicGroupPaymentStudentCourseDetail">
-        SELECT * FROM music_group_payment_student_course_detail mgpscd
-        LEFT JOIN music_group_payment_calender mgpc ON mgpscd.music_group_payment_calender_id_ = mgpc.id_
-        WHERE used_course_minutes_ &lt;= 0
-        AND mgpc.music_group_id_ = #{musicGroupId}
-        AND user_id_ IN
+        SELECT
+            MIN(mgpscd.id_) id_,
+            MIN(mgpscd.music_group_payment_calender_id_) music_group_payment_calender_id_,
+            mgpscd.user_id_,
+            mgpscd.course_type_,
+            SUM(mgpscd.total_course_minutes_) total_course_minutes_,
+            SUM(mgpscd.used_course_minutes_) used_course_minutes_
+        FROM music_group_payment_student_course_detail mgpscd
+            LEFT JOIN music_group_payment_calender mgpc ON mgpscd.music_group_payment_calender_id_ = mgpc.id_
+        WHERE mgpc.music_group_id_ = #{musicGroupId}
+            AND user_id_ IN
         <foreach collection="studentIds" item="studentId" open="(" close=")" separator=",">
             #{studentId}
         </foreach>
+        GROUP BY mgpscd.user_id_,mgpscd.course_type_,mgpc.batch_no_
+        HAVING used_course_minutes_ &lt;= 0
     </select>
 
     <delete id="deleteByUserIdAndMusicGroupId">