Browse Source

1、vip课更新教学点时,去掉同一教学点判断
2、后台新增学员按折扣计算

Joburgess 5 years ago
parent
commit
548736b263

+ 7 - 0
mec-biz/src/main/java/com/ym/mec/biz/service/impl/VipGroupServiceImpl.java

@@ -2275,6 +2275,13 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
 			}
 			}
 		}
 		}
 
 
+		if(Objects.nonNull(vipGroupActivity)){
+            if(vipGroupActivity.getType().equals(VipGroupActivityTypeEnum.DISCOUNT)){
+                VipGroupSalarySettlementDto vipGroupSalarySettlementDto = JSON.parseObject(vipGroupActivity.getSalarySettlementJson(), VipGroupSalarySettlementDto.class);
+                surplusCoursesPrice=surplusCoursesPrice.multiply((vipGroupSalarySettlementDto.getOnlineSalarySettlement().getSettlementValue())).divide(new BigDecimal(100), CommonConstants.DECIMAL_PLACE, BigDecimal.ROUND_DOWN).setScale(0,BigDecimal.ROUND_HALF_UP);
+            }
+        }
+
 		//生成学生单课缴费信息
 		//生成学生单课缴费信息
 		for (Integer studentId:studentIds) {
 		for (Integer studentId:studentIds) {
 			SysUserCashAccount sysUserCashAccount = sysUserCashAccountService.get(studentId);
 			SysUserCashAccount sysUserCashAccount = sysUserCashAccountService.get(studentId);

+ 0 - 1
mec-student/src/main/java/com/ym/mec/student/controller/MusicGroupController.java

@@ -199,7 +199,6 @@ public class MusicGroupController extends BaseController {
 
 
         Integer userId = studentRegistration.getUserId();
         Integer userId = studentRegistration.getUserId();
 
 
-
         StudentPaymentOrder ApplyOrder = studentPaymentOrderService.findMusicGroupApplyOrderByStatus(userId, studentRegistration.getMusicGroupId(), DealStatusEnum.SUCCESS);
         StudentPaymentOrder ApplyOrder = studentPaymentOrderService.findMusicGroupApplyOrderByStatus(userId, studentRegistration.getMusicGroupId(), DealStatusEnum.SUCCESS);
         StudentPaymentOrder waitPay = studentPaymentOrderService.findMusicGroupApplyOrderByStatus(userId, studentRegistration.getMusicGroupId(), DealStatusEnum.WAIT_PAY);
         StudentPaymentOrder waitPay = studentPaymentOrderService.findMusicGroupApplyOrderByStatus(userId, studentRegistration.getMusicGroupId(), DealStatusEnum.WAIT_PAY);
         if (ApplyOrder != null && waitPay == null) {
         if (ApplyOrder != null && waitPay == null) {