From e073352eae4468b67a1a10654c72e03ba0c26d37 Mon Sep 17 00:00:00 2001
From: shinnosuke <tantao@1hoper.com>
Date: 星期日, 27 九月 2026 19:54:40 +0800
Subject: [PATCH] fix(live): 修复小程序养生列表查不到内容的问题

---
 ruoyi-applet/src/main/java/com/ruoyi/web/controller/api/TSysLiveController.java |   25 ++++++++++++++-----------
 1 files changed, 14 insertions(+), 11 deletions(-)

diff --git a/ruoyi-applet/src/main/java/com/ruoyi/web/controller/api/TSysLiveController.java b/ruoyi-applet/src/main/java/com/ruoyi/web/controller/api/TSysLiveController.java
index d3690a3..143df94 100644
--- a/ruoyi-applet/src/main/java/com/ruoyi/web/controller/api/TSysLiveController.java
+++ b/ruoyi-applet/src/main/java/com/ruoyi/web/controller/api/TSysLiveController.java
@@ -97,17 +97,20 @@
         redisCache.setCacheSet(Constants.LIVE_APPOINTMENT_PUSH + id, appointmentPush);
 
         TSysLive sysLive = sysLiveService.getById(id);
-        Map<String, ? extends Object> maps =
-                new ImmutableMap.Builder<String, String>().
-                        put("id", sysLive.getId())
-                        .build();
-        QuartzManager.addJob(
-                LivePushJob.class,
-                (LivePushJob.name+sysLive.getId()).toUpperCase(),
-                TimeJobType.LIVE_PUSH,
-                DateUtils.localDateTimeToDate(sysLive.getStartTime().minusHours(1)),
-                maps
-        );
+        // 录播视频等没有开始时间的内容无法推算提醒时间,只记录预约、不排定时任务
+        if (Objects.nonNull(sysLive) && Objects.nonNull(sysLive.getStartTime())) {
+            Map<String, ? extends Object> maps =
+                    new ImmutableMap.Builder<String, String>().
+                            put("id", sysLive.getId())
+                            .build();
+            QuartzManager.addJob(
+                    LivePushJob.class,
+                    (LivePushJob.name + sysLive.getId()).toUpperCase(),
+                    TimeJobType.LIVE_PUSH,
+                    DateUtils.localDateTimeToDate(sysLive.getStartTime().minusHours(1)),
+                    maps
+            );
+        }
 
         return R.ok();
     }

--
Gitblit v1.7.1