Pārlūkot izejas kodu

1、vip课加学员

Joburgess 5 gadi atpakaļ
vecāks
revīzija
0f11b94971

+ 4 - 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,8 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
                 vipGroup.setStatus(VipGroupStatusEnum.PROGRESS);
             }
             if(currentClassTimes>=totalClassTimes
-                &&vipGroup.getStatus().equals(VipGroupStatusEnum.PROGRESS)){
+                &&vipGroup.getStatus().equals(VipGroupStatusEnum.PROGRESS)
+                &&vipGroup.getCoursesExpireDate().after(now)){
                 vipGroup.setStatus(VipGroupStatusEnum.FINISHED);
             }
             vipGroupDao.update(vipGroup);