|
@@ -695,6 +695,9 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
|
|
|
studentRegistration.setOrganId(musicGroup.getOrganId());
|
|
|
studentRegistration.setPayingStatus(1);
|
|
|
|
|
|
+ Date date = new Date();
|
|
|
+
|
|
|
+ CloudTeacherOrder cloudTeacherOrder = null;
|
|
|
//云教练/云教练+
|
|
|
if (registerPayDto.getBuyCloudTeacher() || registerPayDto.getBuyCloudTeacherPlus()) {
|
|
|
MusicGroupPaymentCalender musicGroupRegCalender = musicGroupPaymentCalenderDao.getMusicGroupRegCalender(studentRegistration.getMusicGroupId());
|
|
@@ -707,6 +710,19 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
|
|
|
|
|
|
orderAmount = orderAmount.add(cloudTeacherPrice);
|
|
|
studentRegistration.setHasCloudTeacher(1);
|
|
|
+
|
|
|
+
|
|
|
+ //创建订单
|
|
|
+ cloudTeacherOrder = new CloudTeacherOrder();
|
|
|
+
|
|
|
+ cloudTeacherOrder.setType(2);//月
|
|
|
+ cloudTeacherOrder.setTime(musicGroupRegCalender.getMemberValidDate());
|
|
|
+
|
|
|
+ cloudTeacherOrder.setOrganId(musicGroup.getOrganId());
|
|
|
+ cloudTeacherOrder.setStudentId(studentRegistration.getUserId());
|
|
|
+ cloudTeacherOrder.setLevel(musicGroupRegCalender.getMemberRankSettingId());
|
|
|
+ cloudTeacherOrder.setAmount(musicGroupRegCalender.getMemberPaymentAmount());
|
|
|
+ cloudTeacherOrder.setStatus(0);
|
|
|
}
|
|
|
|
|
|
if (amount.compareTo(orderAmount) != 0) {
|
|
@@ -723,8 +739,14 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
|
|
|
StudentPaymentOrder studentPaymentOrder = studentRegistrationService.addOrder(studentRegistration, amount, orderNo, channelType, courseFee, goodsGroups, remitFee, courseRemitFee, newCourses, registerPayDto.getBuyMaintenance(), registerPayDto.getBuyCloudTeacher(), registerPayDto.getBuyCloudTeacherPlus());
|
|
|
studentPaymentOrder = studentPaymentOrderService.get(studentPaymentOrder.getId());
|
|
|
boolean canPay = studentPaymentOrder.getClassGroupId() != null && studentPaymentOrder.getClassGroupId().equals(206);
|
|
|
+
|
|
|
+ if(cloudTeacherOrder != null){
|
|
|
+ cloudTeacherOrder.setOrderId(studentPaymentOrder.getId());
|
|
|
+ cloudTeacherOrder.setCreateTime(date);
|
|
|
+ cloudTeacherOrder.setUpdateTime(date);
|
|
|
+ cloudTeacherOrderService.insert(cloudTeacherOrder);
|
|
|
+ }
|
|
|
|
|
|
- Date date = new Date();
|
|
|
BigDecimal balance = BigDecimal.ZERO;
|
|
|
if (registerPayDto.getIsUseBalancePayment() && amount.compareTo(BigDecimal.ZERO) > 0) {
|
|
|
SysUserCashAccount userCashAccount = sysUserCashAccountService.getLocked(userId);
|
|
@@ -758,7 +780,7 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
|
|
|
|
|
|
//更新注册信息
|
|
|
studentRegistrationService.update(studentRegistration);
|
|
|
-
|
|
|
+
|
|
|
if ("205".equals(studentPaymentOrder.getPaymentAccountNo())) {
|
|
|
Integer teacherId = musicGroup.getEducationalTeacherId();
|
|
|
SysUser endTeacher = sysUserFeignService.queryUserById(teacherId);
|
|
@@ -894,6 +916,10 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
|
|
|
studentRegistration.setOrganId(musicGroup.getOrganId());
|
|
|
studentRegistration.setPayingStatus(1);
|
|
|
|
|
|
+ Date date = new Date();
|
|
|
+
|
|
|
+ CloudTeacherOrder cloudTeacherOrder = null;
|
|
|
+
|
|
|
//云教练/云教练+
|
|
|
if (registerPayDto.getBuyCloudTeacher() || registerPayDto.getBuyCloudTeacherPlus()) {
|
|
|
|
|
@@ -907,6 +933,19 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
|
|
|
|
|
|
orderAmount = orderAmount.add(cloudTeacherPrice);
|
|
|
studentRegistration.setHasCloudTeacher(1);
|
|
|
+
|
|
|
+
|
|
|
+ //创建订单
|
|
|
+ cloudTeacherOrder = new CloudTeacherOrder();
|
|
|
+
|
|
|
+ cloudTeacherOrder.setType(2);//月
|
|
|
+ cloudTeacherOrder.setTime(musicGroupRegCalender.getMemberValidDate());
|
|
|
+
|
|
|
+ cloudTeacherOrder.setOrganId(musicGroup.getOrganId());
|
|
|
+ cloudTeacherOrder.setStudentId(studentRegistration.getUserId());
|
|
|
+ cloudTeacherOrder.setLevel(musicGroupRegCalender.getMemberRankSettingId());
|
|
|
+ cloudTeacherOrder.setAmount(musicGroupRegCalender.getMemberPaymentAmount());
|
|
|
+ cloudTeacherOrder.setStatus(0);
|
|
|
}
|
|
|
|
|
|
if (amount.compareTo(orderAmount) != 0) {
|
|
@@ -924,8 +963,14 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
|
|
|
StudentPaymentOrder studentPaymentOrder = studentRegistrationService.addOrder(studentRegistration, amount, orderNo, channelType, courseFee, goodsGroups, remitFee, courseRemitFee, newCourses, registerPayDto.getBuyMaintenance(), registerPayDto.getBuyCloudTeacher(), registerPayDto.getBuyCloudTeacherPlus());
|
|
|
studentPaymentOrder = studentPaymentOrderService.get(studentPaymentOrder.getId());
|
|
|
boolean canPay = studentPaymentOrder.getClassGroupId() != null && studentPaymentOrder.getClassGroupId().equals(206);
|
|
|
- Date date = new Date();
|
|
|
-
|
|
|
+
|
|
|
+ if(cloudTeacherOrder != null){
|
|
|
+ cloudTeacherOrder.setOrderId(studentPaymentOrder.getId());
|
|
|
+ cloudTeacherOrder.setCreateTime(date);
|
|
|
+ cloudTeacherOrder.setUpdateTime(date);
|
|
|
+ cloudTeacherOrderService.insert(cloudTeacherOrder);
|
|
|
+ }
|
|
|
+
|
|
|
BigDecimal balance = BigDecimal.ZERO;
|
|
|
if (registerPayDto.getIsUseBalancePayment() && amount.compareTo(BigDecimal.ZERO) > 0) {
|
|
|
SysUserCashAccount userCashAccount = sysUserCashAccountService.get(userId);
|