yangdamao il y a 2 ans
Parent
commit
1d00300e2f

+ 6 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/course/bo/CheckSectionWatchVo.java

@@ -58,4 +58,10 @@ public class CheckSectionWatchVo implements Serializable {
 
     @ApiModelProperty("录播和回放的url地址")
     private String recordingUrl;
+
+    @ApiModelProperty("直播开始时间")
+    private Long liveStartTime;
+
+    @ApiModelProperty("直播结束时间")
+    private Long liveEndTime;
 }

+ 2 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/course/service/impl/CourseSectionWatchPerServiceImpl.java

@@ -153,6 +153,8 @@ public class CourseSectionWatchPerServiceImpl extends ServiceImpl<CourseSectionW
         watchVo.setCheckStatus(1);
         watchVo.setSectionType(courseSection.getSectionType());
         watchVo.setRecordingUrl(courseSection.getRecordingUrl());
+        watchVo.setLiveStartTime(courseSection.getLiveStartTime());
+        watchVo.setLiveEndTime(courseSection.getLiveEndTime());
         return watchVo;
     }
 }

+ 27 - 7
zhongzheng-system/src/main/java/com/zhongzheng/modules/user/service/impl/UserSubscribeServiceImpl.java

@@ -2105,11 +2105,7 @@ public class UserSubscribeServiceImpl extends ServiceImpl<UserSubscribeMapper, U
     @Override
     public List<ExamSessionVo> getExamSession(Integer month) {
         //根据月份筛选
-        return null;
-    }
-
-    public static void main(String[] args) {
-        String dateStr = "202306"; // 指定年月
+        String dateStr = String.format("20230%s",month); // 指定年月
         LocalDate date = LocalDate.parse(dateStr + "01", DateTimeFormatter.BASIC_ISO_DATE);
         LocalDate dateFirst = date.with(TemporalAdjusters.firstDayOfMonth()); // 指定年月的第一天
         LocalDate dateEnd = date.with(TemporalAdjusters.lastDayOfMonth()); // 指定年月的最后一天
@@ -2117,10 +2113,34 @@ public class UserSubscribeServiceImpl extends ServiceImpl<UserSubscribeMapper, U
         Date date1 = Date.from(zonedDateTime1.toInstant());
         ZonedDateTime zonedDateTime = dateEnd.atStartOfDay(ZoneId.systemDefault());
         Date date2 = Date.from(zonedDateTime.toInstant());
-        System.out.println("dateFirst = " + date1.getTime());
-        System.out.println("dateEnd = " + date2.getTime());
+        Long startTime = date1.getTime()/1000;
+        Long endTime = (date2.getTime()/1000) + 86400;
+
+        List<ExamApplySiteTime> siteTimes = iExamApplySiteTimeService
+                .list(new LambdaQueryWrapper<ExamApplySiteTime>()
+                .ge(ExamApplySiteTime::getExamTime, startTime)
+                .le(ExamApplySiteTime::getExamTime, endTime));
+        if (CollectionUtils.isEmpty(siteTimes)){
+            return new ArrayList<>();
+        }
+
+        return siteTimes.stream().map(item -> {
+            ExamSessionVo vo = new ExamSessionVo();
+            SimpleDateFormat sdf = new SimpleDateFormat("MM月dd号");
+            String format = sdf.format(new Date(item.getExamTime() * 1000));
+            List<ExamApplySiteTimeTwoAddBo> siteTimeTwoAddBos = JSONArray.parseArray(item.getSiteTime(), ExamApplySiteTimeTwoAddBo.class);
+            ExamApplySiteTimeTwoAddBo twoAddBo = siteTimeTwoAddBos.get(0);
+            vo.setExamSession(String.format("%s(%s-%s)",format,twoAddBo.getStartTime(),twoAddBo.getEndTime()));
+            vo.setExamTime(item.getExamTime());
+            vo.setExamStartTime(twoAddBo.getStartTime());
+            vo.setExamEndTime(twoAddBo.getEndTime());
+
+            return vo;
+        }).collect(Collectors.toList());
     }
 
+
+
     private Integer getSeatNumber(UserSubscribeAddBo bo,Long userNum) {
         List<UserSubscribe> list = list(new LambdaQueryWrapper<UserSubscribe>().eq(UserSubscribe::getApplyId, bo.getApplyId())
                 .eq(UserSubscribe::getApplySiteStartTime, bo.getApplySiteStartTime())

+ 2 - 2
zhongzheng-system/src/main/resources/mapper/modules/top/TopOldOrderMapper.xml

@@ -258,10 +258,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             AND o.check_status = #{checkStatus}
         </if>
         <if test="refundStatus != null">
-            AND o.refund_status = #{refundStatus}
+            AND o.order_refund_status = #{refundStatus}
         </if>
         <if test="refundStatusList != null and refundStatusList.size()!=0 ">
-            AND o.refund_status in
+            AND o.order_refund_status in
             <foreach collection="refundStatusList" item="item" index="index" open="(" close=")" separator=",">
                 #{item}
             </foreach>