فهرست منبع

直播间订阅

yuhongqi 17 ساعت پیش
والد
کامیت
350f360f71

+ 1 - 4
fs-live-app/src/main/java/com/fs/live/websocket/service/WebSocketServer.java

@@ -362,10 +362,7 @@ public class WebSocketServer {
                             if (currentLive == null) {
                                 break;
                             }
-                            Map<String, Integer> liveFlagWithCache = liveWatchUserService.getLiveFlagWithCache(currentLive.getLiveId());
-                            if(1 != liveFlagWithCache.get("liveFlag")) {
-                                break;
-                            }
+
 
                             // 判断直播是否已开始:status=2(直播中) 或 当前时间 >= 开播时间
                             boolean isLiveStarted = false;

+ 4 - 1
fs-service/src/main/java/com/fs/live/service/impl/LiveServiceImpl.java

@@ -319,6 +319,9 @@ public class LiveServiceImpl implements ILiveService
 
     @Override
     public R subNotifyLive(LiveNotifyParam param) {
+        if (StringUtils.isEmpty(param.getAppId())) {
+            return R.error("小程序订阅失败:appId为空!");
+        }
         LiveMiniprogramSubNotifyTask notifyTask = new LiveMiniprogramSubNotifyTask();
         notifyTask.setPage("pages_course/living?liveId=" + param.getLiveId());
         notifyTask.setTaskName("直播间预约提醒");
@@ -326,7 +329,7 @@ public class LiveServiceImpl implements ILiveService
         Long userId = param.getUserId();
         Wrapper<FsUserWx> queryWrapper = Wrappers.<FsUserWx>lambdaQuery()
                 .eq(FsUserWx::getFsUserId, userId)
-                .eq(FsUserWx::getAppId, StringUtils.isEmpty(param.getAppId()) ? "wx44beed5640bcb1ba" : param.getAppId()); // 卓美小程序
+                .eq(FsUserWx::getAppId, StringUtils.isEmpty(param.getAppId()) ? "wxd791d5933ed42218" : param.getAppId()); // 卓美小程序
         FsUserWx fsUserWx = fsUserWxMapper.selectOne(queryWrapper);
         String maOpenId = "";
         if (fsUserWx == null) {