소스 검색

1、vip课加学员

Joburgess 5 년 전
부모
커밋
0f11b94971
1개의 변경된 파일4개의 추가작업 그리고 1개의 파일을 삭제
  1. 4 1
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/ClassGroupServiceImpl.java

+ 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);