Forráskód Böngészése

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

zouxuan 5 éve
szülő
commit
0b0992c60c

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

@@ -2056,6 +2056,8 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
             }
         }
 
+        Date now = new Date();
+
         classGroup.setTotalClassTimes(totalClassTimes);
         classGroup.setCurrentClassTimes(currentClassTimes);
         Integer studentNum = classGroupStudentMapperDao.countClassGroupStudentNum(classGroupId);
@@ -2067,7 +2069,9 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
                 vipGroup.setStatus(VipGroupStatusEnum.PROGRESS);
             }
             if(currentClassTimes>=totalClassTimes
-                &&vipGroup.getStatus().equals(VipGroupStatusEnum.PROGRESS)){
+                &&vipGroup.getStatus().equals(VipGroupStatusEnum.PROGRESS)
+                    &&Objects.nonNull(vipGroup.getCoursesExpireDate())
+                &&vipGroup.getCoursesExpireDate().after(now)){
                 vipGroup.setStatus(VipGroupStatusEnum.FINISHED);
             }
             vipGroupDao.update(vipGroup);