Ver Fonte

Merge branch 'master' of http://git.dayaedu.com/yonge/mec

yonge há 5 anos atrás
pai
commit
9ee626d563

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

@@ -2337,8 +2337,7 @@ public class PracticeGroupServiceImpl extends BaseServiceImpl<Long, PracticeGrou
         }
         now.plusDays(1);
         Date applyStartDate = Date.from(now.atStartOfDay(zoneId).toInstant());
-        now.plusMonths(buyMonths);
-        Date applyEndDate = Date.from(now.atStartOfDay(zoneId).toInstant());
+        Date applyEndDate = Date.from(now.plusMonths(buyMonths).atStartOfDay(zoneId).toInstant());
         Date firstMonday = DateUtil.getWeekDayWithDate(applyStartDate, Calendar.MONDAY);
         Date secondSunday = DateUtil.getWeekDayWithDate(applyEndDate, Calendar.SUNDAY);
 
@@ -2839,7 +2838,7 @@ public class PracticeGroupServiceImpl extends BaseServiceImpl<Long, PracticeGrou
     private List<CourseSchedule> createPracticeCourses(PracticeGroupBuyDto practiceGroupBuyParams, Integer practiceCourseMinutes){
         List<CourseSchedule> courseSchedules=new ArrayList<>();
         LocalDate courseStartDay=LocalDateTime.ofInstant(practiceGroupBuyParams.getCoursesStartDate().toInstant(),DateUtil.zoneId).toLocalDate();
-        LocalDate courseEndDay=LocalDateTime.ofInstant(practiceGroupBuyParams.getCoursesExpireDate().toInstant(),DateUtil.zoneId).toLocalDate();
+        LocalDate courseEndDay=LocalDateTime.ofInstant(practiceGroupBuyParams.getCoursesExpireDate().toInstant(),DateUtil.zoneId).plusSeconds(1).toLocalDate();
         while (courseStartDay.compareTo(courseEndDay)<0){
             int dayOfWeek = courseStartDay.get(DateUtil.weekFields.dayOfWeek());
             for (PracticeDrillTimeDto drillTime : practiceGroupBuyParams.getDrillTimes()) {