瀏覽代碼

Merge remote-tracking branch 'origin/master'

周箭河 4 年之前
父節點
當前提交
579116b54b
共有 1 個文件被更改,包括 4 次插入2 次删除
  1. 4 2
      mec-biz/src/main/resources/config/mybatis/MusicGroupPaymentCalenderMapper.xml

+ 4 - 2
mec-biz/src/main/resources/config/mybatis/MusicGroupPaymentCalenderMapper.xml

@@ -465,12 +465,14 @@
         SELECT mgpc.batch_no_,MAX(mgpc.music_group_id_) music_group_id_
         ,MAX(mgpc.create_time_) create_time_,MAX(mgpc.payment_type_) payment_type_,MAX(mgpc.operator_) operator_,
         MAX(mgpc.pay_user_type_) pay_user_type_,MAX(mgpc.memo_) memo_,MAX(mgpc.audit_memo_) audit_memo_,MAX(mgpc.status_) status_,
-        SUM(mgpccs.course_total_minuties_) course_total_minuties_,
-        SUM(mgpccs.course_original_price_) course_original_price_,SUM(mgpccs.course_current_price_) course_current_price_,
+        CASE WHEN MAX(mgpc.payment_type_) = 'SPAN_GROUP_CLASS_ADJUST' THEN MAX(mgsca.master_class_course_times_) ELSE SUM(mgpccs.course_total_minuties_) END course_total_minuties_,
+        CASE WHEN MAX(mgpc.payment_type_) = 'SPAN_GROUP_CLASS_ADJUST' THEN MAX(mgpc.payment_amount_) ELSE SUM(mgpccs.course_original_price_) END course_original_price_,
+        SUM(mgpccs.course_current_price_) course_current_price_,
         MAX(mg.name_) music_group_name_,MAX(mg.organ_id_) organ_id_,MAX(mgpc.payment_pattern_)payment_pattern_
         FROM music_group_payment_calender mgpc
         LEFT JOIN music_group mg ON mg.id_ = mgpc.music_group_id_
         LEFT JOIN music_group_payment_calender_course_settings mgpccs ON mgpc.id_ = mgpccs.music_group_payment_calender_id_
+        LEFT JOIN music_group_student_class_adjust mgsca ON  mgsca.batch_no_ = mgpc.batch_no_
         <include refid="MusicGroupPaymentCalenderAuditDtoSql"/>
         GROUP BY mgpc.batch_no_
         ORDER BY create_time_ DESC