浏览代码

系统收费新增AMR收费模式

zouxuan 4 年之前
父节点
当前提交
478eb2f612

+ 9 - 0
mec-biz/src/main/java/com/ym/mec/biz/service/impl/MusicGroupServiceImpl.java

@@ -2950,6 +2950,15 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
                 musicGroupPaymentCalenderCourseSettingsDao.deleteByMusicGroupPaymentCalenderId(calenderIds);
             }
         }
+        //课程团和amr可以互相修改,但不可以改为会员团
+        if(group.getCourseViewType() != musicGroup.getCourseViewType()){
+            if(group.getCourseViewType() == CourseViewTypeEnum.MEMBER_FEE){
+                throw new BizException("会员收费乐团不可更改收费模式");
+            }
+            if(musicGroup.getCourseViewType() == CourseViewTypeEnum.MEMBER_FEE){
+                throw new BizException("当前乐团收费模式不可更改为会员收费");
+            }
+        }
         musicGroup.setUpdateTime(date);
         musicGroupDao.update(musicGroup);
         // 删除乐团付费主体列表

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

@@ -1371,7 +1371,7 @@
 			</foreach>
 		</if>
 		GROUP BY DATE_FORMAT(spo.pay_time_,'%Y-%m-%d')
-		UNION
+		UNION ALL
 		SELECT spo.organ_id_,SUM(CASE WHEN spo.actual_amount_ IS NULL THEN 0 ELSE spo.actual_amount_ END +
 		CASE WHEN spo.balance_payment_amount_ IS NULL THEN 0 ELSE spo.balance_payment_amount_ END) total_num_
 		,DATE_FORMAT(spo.pay_time_,'%Y-%m-%d') month_
@@ -1403,7 +1403,7 @@
 			</foreach>
 		</if>
 		GROUP BY DATE_FORMAT(spo.pay_time_,'%Y-%m-%d')
-		UNION
+		UNION ALL
 		SELECT spo.organ_id_,SUM(CASE WHEN spod.price_ IS NULL THEN 0 ELSE spod.price_ END) total_num_,DATE_FORMAT(spo.pay_time_,'%Y-%m-%d') month_
 		FROM student_payment_order spo
 			   LEFT JOIN student_payment_order_detail spod ON spo.id_ = spod.payment_order_id_