|
@@ -2786,10 +2786,7 @@ public class PracticeGroupServiceImpl extends BaseServiceImpl<Long, PracticeGrou
|
|
|
|
|
|
Date now = new Date();
|
|
|
|
|
|
- int studentExitChargePractices = practiceGroupDao.checkStudentExitChargePractice(practiceGroupBuyParams.getStudentId());
|
|
|
- if(sysUser.getOrganId()==14){
|
|
|
- studentExitChargePractices = 0;
|
|
|
- }
|
|
|
+ int studentExitChargePractices = practiceGroupDao.checkStudentExitChargePractice(practiceGroupBuyParams.getStudentId(),"2021-03-10 00:00:00");
|
|
|
|
|
|
LocalDate courseStartDay = LocalDate.now();
|
|
|
LocalDate tempCourseLocalDate = LocalDate.parse("2020-03-01", DateUtil.dateFormatter);
|
|
@@ -2897,7 +2894,7 @@ public class PracticeGroupServiceImpl extends BaseServiceImpl<Long, PracticeGrou
|
|
|
throw new BizException("所在城市暂不参与此活动");
|
|
|
}
|
|
|
BigDecimal oneMonthPrice;
|
|
|
- if (practiceBuyActivityExpireDate.after(now)&&Objects.nonNull(sysUser.getOrganId())&&sysUser.getOrganId()==14) {
|
|
|
+ if (practiceBuyActivityExpireDate.after(now)&&Objects.nonNull(sysUser.getOrganId())&&sysUser.getOrganId()==14&& studentExitChargePractices <= 0) {
|
|
|
oneMonthPrice = practiceGroupBuyParams.getDrillTimesOnWeek() == 1 ? practiceGroupSellPrice.getOnceActivityPrice() : practiceGroupSellPrice.getTwiceActivityPrice();
|
|
|
if (!now.before(practicePromotionActivityStartDate) && practiceGroupBuyParams.getBuyMonths() >= 3 && studentExitChargePractices > 0) {
|
|
|
oneMonthPrice = practiceGroupBuyParams.getDrillTimesOnWeek() == 1 ? practiceGroupSellPrice.getOnceQuartActivityPrice() : practiceGroupSellPrice.getTwiceQuartActivityPrice();
|
|
@@ -2908,7 +2905,7 @@ public class PracticeGroupServiceImpl extends BaseServiceImpl<Long, PracticeGrou
|
|
|
oneMonthPrice = practiceGroupBuyParams.getDrillTimesOnWeek() == 1 ? practiceGroupSellPrice.getOnceOriginalPrice() : practiceGroupSellPrice.getTwiceOriginalPrice();
|
|
|
}
|
|
|
BigDecimal amount = oneMonthPrice.multiply(new BigDecimal(practiceGroupBuyParams.getBuyMonths()));
|
|
|
- if (!now.before(practicePromotionActivityStartDate) && now.before(practiceBuyActivityExpireDate) && studentExitChargePractices <= 0) {
|
|
|
+ if (!now.before(practicePromotionActivityStartDate) && now.before(practiceBuyActivityExpireDate) && Objects.nonNull(sysUser.getOrganId())&&sysUser.getOrganId()==14 && studentExitChargePractices <= 0) {
|
|
|
amount = oneMonthPrice.multiply(new BigDecimal(1));
|
|
|
}
|
|
|
|
|
@@ -3733,7 +3730,7 @@ public class PracticeGroupServiceImpl extends BaseServiceImpl<Long, PracticeGrou
|
|
|
|
|
|
@Override
|
|
|
public boolean isPurchasedPracticeCourse(Integer userId) {
|
|
|
- int count = practiceGroupDao.checkStudentExitChargePractice(userId);
|
|
|
+ int count = practiceGroupDao.checkStudentExitChargePractice(userId, null);
|
|
|
if (count > 0) {
|
|
|
return true;
|
|
|
}
|