|
@@ -96,7 +96,6 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
|
|
|
private ImGroupMemberService imGroupMemberService;
|
|
|
@Autowired
|
|
|
private ImUserFriendService imUserFriendService;
|
|
|
-
|
|
|
@Autowired
|
|
|
private ImGroupService imGroupService;
|
|
|
@Autowired
|
|
@@ -115,8 +114,6 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
|
|
|
@Autowired
|
|
|
private SysConfigDao sysConfigDao;
|
|
|
@Autowired
|
|
|
- private SysTenantConfigService sysTenantConfigService;
|
|
|
- @Autowired
|
|
|
private SysUserCashAccountDetailService sysUserCashAccountDetailService;
|
|
|
@Autowired
|
|
|
private SysMessageService sysMessageService;
|
|
@@ -164,6 +161,8 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
|
|
|
private ActivityUserMapperService activityUserMapperService;
|
|
|
@Autowired
|
|
|
private PracticeGroupService practiceGroupService;
|
|
|
+ @Autowired
|
|
|
+ private SysUserCashAccountLogService sysUserCashAccountLogService;
|
|
|
|
|
|
private static final Logger LOGGER = LoggerFactory
|
|
|
.getLogger(VipGroup.class);
|
|
@@ -3018,12 +3017,12 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
|
|
|
surplusCourseFee = new BigDecimal(0);
|
|
|
}
|
|
|
VipGroupCategory vipGroupCategory = vipGroupCategoryDao.get(vipGroup.getVipGroupCategoryId().intValue());
|
|
|
-
|
|
|
- if(vipGroupCategory.getStudentNum()<=1){
|
|
|
- surplusCourseFee = surplusCourseFee.multiply(new BigDecimal(0.8)).setScale(CommonConstants.DECIMAL_FINAL_PLACE, BigDecimal.ROUND_HALF_UP);
|
|
|
- }else{
|
|
|
- surplusCourseFee = surplusCourseFee.multiply(new BigDecimal(0.7)).setScale(CommonConstants.DECIMAL_FINAL_PLACE, BigDecimal.ROUND_HALF_UP);
|
|
|
- }
|
|
|
+ surplusCourseFee = sysUserCashAccountLogService.vipReturnFeeCharges(surplusCourseFee,vipGroupCategory == null?0:vipGroupCategory.getStudentNum());
|
|
|
+// if(vipGroupCategory.getStudentNum()<=1){
|
|
|
+// surplusCourseFee = surplusCourseFee.multiply(new BigDecimal(0.8)).setScale(CommonConstants.DECIMAL_FINAL_PLACE, BigDecimal.ROUND_HALF_UP);
|
|
|
+// }else{
|
|
|
+// surplusCourseFee = surplusCourseFee.multiply(new BigDecimal(0.7)).setScale(CommonConstants.DECIMAL_FINAL_PLACE, BigDecimal.ROUND_HALF_UP);
|
|
|
+// }
|
|
|
|
|
|
studentApplyRefunds.setExpectAmount(surplusCourseFee);
|
|
|
studentApplyRefunds.setStatus(StudentApplyRefundsStatus.ING);
|
|
@@ -3692,12 +3691,12 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
|
|
|
if(Objects.isNull(bigDecimal)){
|
|
|
bigDecimal = new BigDecimal(0);
|
|
|
}
|
|
|
-
|
|
|
- if(vipGroupCategory == null || vipGroupCategory.getStudentNum() <= 1){
|
|
|
- bigDecimal = bigDecimal.multiply(new BigDecimal(0.8)).setScale(CommonConstants.DECIMAL_FINAL_PLACE, BigDecimal.ROUND_HALF_UP);
|
|
|
- }else{
|
|
|
- bigDecimal = bigDecimal.multiply(new BigDecimal(0.7)).setScale(CommonConstants.DECIMAL_FINAL_PLACE, BigDecimal.ROUND_HALF_UP);
|
|
|
- }
|
|
|
+ bigDecimal = sysUserCashAccountLogService.vipReturnFeeCharges(bigDecimal,vipGroupCategory == null?0:vipGroupCategory.getStudentNum());
|
|
|
+// if(vipGroupCategory == null || vipGroupCategory.getStudentNum() <= 1){
|
|
|
+// bigDecimal = bigDecimal.multiply(new BigDecimal(0.8)).setScale(CommonConstants.DECIMAL_FINAL_PLACE, BigDecimal.ROUND_HALF_UP);
|
|
|
+// }else{
|
|
|
+// bigDecimal = bigDecimal.multiply(new BigDecimal(0.7)).setScale(CommonConstants.DECIMAL_FINAL_PLACE, BigDecimal.ROUND_HALF_UP);
|
|
|
+// }
|
|
|
|
|
|
result.put("suplusCourseFee", bigDecimal);
|
|
|
|
|
@@ -3706,11 +3705,13 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
|
|
|
if(Objects.nonNull(studentPaymentOrder)){
|
|
|
BigDecimal suplusCourseOriginalFee = studentPaymentOrder.getActualAmount().add(studentPaymentOrder.getBalancePaymentAmount());
|
|
|
result.put("suplusCourseOriginalFee", suplusCourseOriginalFee);
|
|
|
- if(vipGroupCategory == null || vipGroupCategory.getStudentNum() <= 1){
|
|
|
- result.put("suplusCourseFee", suplusCourseOriginalFee.multiply(new BigDecimal(0.8)).setScale(CommonConstants.DECIMAL_FINAL_PLACE, BigDecimal.ROUND_HALF_UP));
|
|
|
- }else{
|
|
|
- result.put("suplusCourseFee", suplusCourseOriginalFee.multiply(new BigDecimal(0.7)).setScale(CommonConstants.DECIMAL_FINAL_PLACE, BigDecimal.ROUND_HALF_UP));
|
|
|
- }
|
|
|
+ result.put("suplusCourseFee", sysUserCashAccountLogService.vipReturnFeeCharges(suplusCourseOriginalFee,vipGroupCategory == null?0:vipGroupCategory.getStudentNum()));
|
|
|
+
|
|
|
+// if(vipGroupCategory == null || vipGroupCategory.getStudentNum() <= 1){
|
|
|
+// result.put("suplusCourseFee", suplusCourseOriginalFee.multiply(new BigDecimal(0.8)).setScale(CommonConstants.DECIMAL_FINAL_PLACE, BigDecimal.ROUND_HALF_UP));
|
|
|
+// }else{
|
|
|
+// result.put("suplusCourseFee", suplusCourseOriginalFee.multiply(new BigDecimal(0.7)).setScale(CommonConstants.DECIMAL_FINAL_PLACE, BigDecimal.ROUND_HALF_UP));
|
|
|
+// }
|
|
|
}
|
|
|
}
|
|
|
return result;
|