Ver Fonte

Merge branch 'cloud_teacher_plus_feature'

周箭河 há 4 anos atrás
pai
commit
c2fbcc2c65

+ 5 - 1
mec-biz/src/main/java/com/ym/mec/biz/service/impl/ContractServiceImpl.java

@@ -1033,7 +1033,6 @@ public class ContractServiceImpl implements ContractService, InitializingBean {
 			params.put("ownershipType", musicGroup.getOwnershipType().name());
 			ownershipType = musicGroup.getCourseViewType();
 		}
-
 		params.put("courseViewType", ownershipType.getCode());
 
 		List<SysUserContracts> userContracts = sysUserContractsService.getUserContractWithType(userId, ContractType.PRODUCT, CourseViewTypeEnum.COURSE_lIST.equals(ownershipType)?COURSE_CONTRACT_VERSION:AMR_CONTRACT_VERSION);
@@ -1117,12 +1116,14 @@ public class ContractServiceImpl implements ContractService, InitializingBean {
 
 		Map<String, Object> result = new HashMap<>();
 		result.put("courseViewType", CourseViewTypeEnum.COURSE_lIST);
+		CourseViewTypeEnum ownershipType = CourseViewTypeEnum.COURSE_lIST;
 
 		if(StringUtils.isBlank(musicGroupId)){
 			params.put("ownershipType", "OWN");
 			MusicGroup userLastNormalMusicGroup = studentRegistrationDao.getUserLastNormalMusicGroup(userId);
 			if(Objects.nonNull(userLastNormalMusicGroup)){
 				result.put("courseViewType", userLastNormalMusicGroup.getCourseViewType());
+				ownershipType = userLastNormalMusicGroup.getCourseViewType();
 			}
 		}else{
 			MusicGroup musicGroup = musicGroupService.get(musicGroupId);
@@ -1131,8 +1132,11 @@ public class ContractServiceImpl implements ContractService, InitializingBean {
 			}
 			params.put("ownershipType", musicGroup.getOwnershipType().name());
 			result.put("courseViewType", musicGroup.getCourseViewType());
+			ownershipType = musicGroup.getCourseViewType();
 		}
 
+		params.put("courseViewType", ownershipType.getCode());
+
 		templateEngine.render(params, "product"+(CourseViewTypeEnum.COURSE_lIST.equals(result.get("courseViewType"))?COURSE_CONTRACT_VERSION:AMR_CONTRACT_VERSION)+".ftl", srcFile);
 
 		String html = "";

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

@@ -699,7 +699,7 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
 
         String channelType = "";
 
-        StudentPaymentOrder studentPaymentOrder = studentRegistrationService.addOrder(studentRegistration, amount, orderNo, channelType, courseFee, goodsGroups, remitFee, courseRemitFee, newCourses, registerPayDto.getBuyMaintenance(), registerPayDto.getBuyCloudTeacher(),registerPayDto.getBuyCloudTeacherPlus());
+        StudentPaymentOrder studentPaymentOrder = studentRegistrationService.addOrder(studentRegistration, amount, orderNo, channelType, courseFee, goodsGroups, remitFee, courseRemitFee, newCourses, registerPayDto.getBuyMaintenance(), registerPayDto.getBuyCloudTeacher(), registerPayDto.getBuyCloudTeacherPlus());
         studentPaymentOrder = studentPaymentOrderService.get(studentPaymentOrder.getId());
 
         Date date = new Date();
@@ -1794,7 +1794,7 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
             if (hasPaid && musicGroupSubjectPlan != null) {
                 musicGroupSubjectPlan.setUpdateTime(date);
                 //减去缴费人数(器乐收费,0元时不减缴费人数)
-                if (musicGroup.getCourseViewType().equals(CourseViewTypeEnum.CLOUD_TEACHER)) {
+                if (musicGroup.getCourseViewType().equals(CourseViewTypeEnum.CLOUD_TEACHER) || musicGroup.getCourseViewType().equals(CourseViewTypeEnum.CLOUD_TEACHER_PLUS)) {
                     if (studentPaymentOrder != null && studentPaymentOrder.getPaymentAccountNo() != null && studentPaymentOrder.getPaymentAccountNo().equals("200")) {
                         musicGroupSubjectPlan.setPaidZeroNum(musicGroupSubjectPlan.getPaidZeroNum() - 1);
                         musicGroupSubjectPlan.setPaidStudentNum(musicGroupSubjectPlan.getPaidStudentNum() - 1);
@@ -2025,7 +2025,7 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
         if (hasPaid && musicGroupSubjectPlan != null) {
             musicGroupSubjectPlan.setUpdateTime(date);
             //减去缴费人数(器乐收费,0元时不减缴费人数)
-            if (musicGroup.getCourseViewType().equals(CourseViewTypeEnum.CLOUD_TEACHER)) {
+            if (musicGroup.getCourseViewType().equals(CourseViewTypeEnum.CLOUD_TEACHER) || musicGroup.getCourseViewType().equals(CourseViewTypeEnum.CLOUD_TEACHER_PLUS)) {
                 if (studentPaymentOrder != null && studentPaymentOrder.getPaymentAccountNo() != null && studentPaymentOrder.getPaymentAccountNo().equals("200")) {
                     musicGroupSubjectPlan.setPaidZeroNum(musicGroupSubjectPlan.getPaidZeroNum() - 1);
                     musicGroupSubjectPlan.setPaidStudentNum(musicGroupSubjectPlan.getPaidStudentNum() - 1);

+ 1 - 1
mec-biz/src/main/resources/config/contracts/product4.ftl

@@ -119,7 +119,7 @@
         <div>(本协议中“乙方“指学员及家长;”乙方学员“指购买甲方产品或服务的学员;”乙方家长“仅指乙方学员的法定监护人。)</div>
 
         <p class="underline bold">重要须知:在注册或购买使用甲方提供的产品、服务之前,请您务必审慎阅读、充分理解本使用协议各条款内容, 特别是免除或者限制甲方责任的条款、对您权利进行限制的条款、约定争议解决方式和司法管辖的条款等。 限制、免责条款或者其他涉及您重大权益的条款可能以加粗、加下划线等形式提示您重点注意。您注册或购买使用甲方提供的产品和服务,均视为您同意本使用协议,以及同意接受本使用协议的约束。</p>
-        <p class="underline bold">如无特别说明 ,下列术语在本协议中的定义为:管乐迷平台(下称“本平台”),即管乐迷APP;乐器练习云教练<#if courseViewType == 3><sup>+</sup></#if>系统(下称“本系统”)指由甲方提供的器乐教学全流程辅助系统,包括媒体资料,教师点评,课前、课中、课后管理等服务,具体以该系统实际提供为准。该系统将根据实际需要进行调整和增减,乙方使用平台时需遵守本服务协议。</p>
+        <p class="bold">如无特别说明 ,下列术语在本协议中的定义为:管乐迷平台(下称“本平台”),即管乐迷APP;乐器练习云教练<#if courseViewType == 3><sup>+</sup></#if>系统(下称“本系统”)指由甲方提供的器乐教学全流程辅助系统,包括媒体资料,教师点评,课前、课中、课后管理等服务,具体以该系统实际提供为准。该系统将根据实际需要进行调整和增减,乙方使用平台时需遵守本服务协议。</p>
 
         <h2>一、注册及购买</h2>
         <div>1、无论是否源自甲方建议,乙方选择报名注册加入乐团,或选择购买使用甲方提供的产品和服务,均为乙方自主意愿的表达及独立自主的选择。</div>