Joburgess 5 years ago
parent
commit
04c4b7a15e

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

@@ -2040,6 +2040,11 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
 			StudentPaymentOrder studentPaymentOrder = studentPaymentOrderDao.findByStudentVipGroup(vipGroupId, studentId, DealStatusEnum.SUCCESS.getCode());
 			if(Objects.nonNull(studentPaymentOrder)){
 				result.put("suplusCourseOriginalFee", studentPaymentOrder.getExpectAmount());
+				if(vipGroupCategory.getStudentNum()<=1){
+					result.put("suplusCourseFee", studentPaymentOrder.getExpectAmount().multiply(new BigDecimal(0.8)).setScale(CommonConstants.DECIMAL_FINAL_PLACE, BigDecimal.ROUND_HALF_UP));
+				}else{
+					result.put("suplusCourseFee", studentPaymentOrder.getExpectAmount().multiply(new BigDecimal(0.7)).setScale(CommonConstants.DECIMAL_FINAL_PLACE, BigDecimal.ROUND_HALF_UP));
+				}
 				result.put("suplusCourseFee", studentPaymentOrder.getExpectAmount());
 			}
 		}