he2802 3 anos atrás
pai
commit
52835e0d4f

+ 6 - 14
zhongzheng-system/src/main/java/com/zhongzheng/modules/schedule/service/impl/ScheduleServiceImpl.java

@@ -658,6 +658,10 @@ public class ScheduleServiceImpl extends ServiceImpl<PolyvVideoMapper, PolyvVide
                                 }
                                 Calendar c5 = Calendar.getInstance();
                                 if (dayStudyVo.getDate() <= c5.get(Calendar.DAY_OF_MONTH) && clCalendarStudyVo.getMonth() == (c5.get(Calendar.MONTH) + 1) && clCalendarStudyVo.getYear() == (c5.get(Calendar.YEAR))) {
+                                    if(Validator.isNotEmpty(dayStudyVo.getPerform())&&dayStudyVo.getPerform().equals(0)){
+                                        //过期且没完成
+                                        dayStudyVo.setPerform(2);
+                                    }
                                     continue;
                                 }
 
@@ -675,13 +679,7 @@ public class ScheduleServiceImpl extends ServiceImpl<PolyvVideoMapper, PolyvVide
                                     }
                                 }
 
-                            //    dayStudyVo.setPerform(0);
-                                if (dayStudyVo.getDate() > c5.get(Calendar.DAY_OF_MONTH) && clCalendarStudyVo.getMonth() == (c5.get(Calendar.MONTH) + 1) && clCalendarStudyVo.getYear() == (c5.get(Calendar.YEAR))) {
-                                    if(Validator.isNotEmpty(dayStudyVo.getPerform())&&dayStudyVo.getPerform().equals(0)){
-                                        //过期且没完成
-                                        dayStudyVo.setPerform(2);
-                                    }
-                                }
+                                dayStudyVo.setPerform(0);
                                 List<DaySectionVo> daySectionList = new ArrayList<>();
                                 if (!com.baomidou.mybatisplus.core.toolkit.CollectionUtils.isEmpty(dayStudyVo.getDaySectionList())) {
                                     daySectionList = dayStudyVo.getDaySectionList();
@@ -694,13 +692,7 @@ public class ScheduleServiceImpl extends ServiceImpl<PolyvVideoMapper, PolyvVide
                                     daySectionVo.setStudyGoodsKnob(Convert.toLong(Sec));
                                 }
 
-                            //    daySectionVo.setGoodsPerform(0);
-                                if (dayStudyVo.getDate() > c5.get(Calendar.DAY_OF_MONTH) && clCalendarStudyVo.getMonth() == (c5.get(Calendar.MONTH) + 1) && clCalendarStudyVo.getYear() == (c5.get(Calendar.YEAR))) {
-                                    if(Validator.isNotEmpty(daySectionVo.getGoodsPerform())&&daySectionVo.getGoodsPerform().equals(0)){
-                                        //过期且没完成
-                                        daySectionVo.setGoodsPerform(2);
-                                    }
-                                }
+                                daySectionVo.setGoodsPerform(0);
                                 daySectionList.add(daySectionVo);
                                 dayStudyVo.setDaySectionList(daySectionList);
                                 allNum -= Sec;

+ 3 - 0
zhongzheng-system/src/main/resources/mapper/modules/course/CourseMapper.xml

@@ -488,6 +488,9 @@
         AND og.refund_status in (0,1,3)
         AND og.pay_status in (2,3)
         AND g.goods_type =1
+        <if test="pageNum == null">
+            and (SELECT count(*) from class_grade cg where (cg.class_end_time >  unix_timestamp(now()) or ISNULL(cg.class_end_time)) and cg.grade_id = og.grade_id ) >0
+        </if>
         <if test="userId != null and userId != ''">
             and o.user_id = #{userId}
         </if>