Joburgess 5 년 전
부모
커밋
04c4b7a15e
1개의 변경된 파일5개의 추가작업 그리고 0개의 파일을 삭제
  1. 5 0
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/VipGroupServiceImpl.java

+ 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());
 			}
 		}