Joburgess 5 년 전
부모
커밋
2213431d21

+ 2 - 2
mec-biz/src/main/java/com/ym/mec/biz/service/impl/CourseScheduleStudentPaymentServiceImpl.java

@@ -90,7 +90,7 @@ public class CourseScheduleStudentPaymentServiceImpl extends BaseServiceImpl<Lon
 							courseScheduleStudentPayment.setExpectPrice(
 									vipGroupApplyBaseInfoDto.getOnlineClassesUnitPrice().multiply(
 											new BigDecimal(vipGroupActivity.getAttribute1()))
-											.divide(new BigDecimal(100), CommonConstants.DECIMAL_FINAL_PLACE, BigDecimal.ROUND_DOWN)
+											.divide(new BigDecimal(100), CommonConstants.DECIMAL_FINAL_PLACE, BigDecimal.ROUND_HALF_UP)
 							);
 							break;
 						case GIVE_CLASS:
@@ -114,7 +114,7 @@ public class CourseScheduleStudentPaymentServiceImpl extends BaseServiceImpl<Lon
 							courseScheduleStudentPayment.setExpectPrice(
 									vipGroupApplyBaseInfoDto.getOfflineClassesUnitPrice().multiply(
 											new BigDecimal(vipGroupActivity.getAttribute1()))
-											.divide(new BigDecimal(100), CommonConstants.DECIMAL_FINAL_PLACE, BigDecimal.ROUND_DOWN)
+											.divide(new BigDecimal(100), CommonConstants.DECIMAL_FINAL_PLACE, BigDecimal.ROUND_HALF_UP)
 							);
 							break;
 						case GIVE_CLASS:

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

@@ -956,7 +956,7 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
 			case DISCOUNT:
 				BigDecimal discount=new BigDecimal(vipGroupActivity.getAttribute1());
 				totalPrice=onlineVipGroupCharge.add(offlineVipGroupCharge);
-				totalPrice=totalPrice.multiply(discount).divide(new BigDecimal(100), CommonConstants.DECIMAL_PLACE, BigDecimal.ROUND_DOWN).setScale(CommonConstants.DECIMAL_FINAL_PLACE,BigDecimal.ROUND_HALF_UP);
+				totalPrice=totalPrice.multiply(discount).divide(new BigDecimal(100), CommonConstants.DECIMAL_FINAL_PLACE, BigDecimal.ROUND_HALF_UP);
 				break;
 			case GIVE_CLASS:
 				if(totalClassNum.compareTo(new BigDecimal(vipGroupActivity.getAttribute1()))<0){