lyhzzz 2 yıl önce
ebeveyn
işleme
8139728de4

+ 4 - 2
src/main/java/com/fdkankan/tk/service/impl/RoomServiceImpl.java

@@ -341,12 +341,14 @@ public class RoomServiceImpl extends ServiceImpl<IRoomMapper, Room> implements I
 
         if(role.equals("follower")){
             if(type == 0 ){
-                this.roomAddView(roomId);
+                room.setRoomViewCount(room.getRoomViewCount() + 1);
             }
             String liveId = redisUtil.get(RoomUtil.redisKey+"live:"+wxRoomId);
             if(StringUtils.isNotBlank(liveId)){
                 roomVisitLogService.addLog(Integer.parseInt(liveId),roomId,userId,type);
             }
+            room.setUpdateTime(null);
+            this.updateById(room);
             return;
         }
 
@@ -367,7 +369,7 @@ public class RoomServiceImpl extends ServiceImpl<IRoomMapper, Room> implements I
         }
 
         if(type == 0 ){     //加入房间,开启带看
-            this.roomAddView(roomId);
+            room.setRoomViewCount(room.getRoomViewCount() + 1);
             room.setRoomStatus(1);
             RoomLive roomLive = roomLiveService.addLiveByRoomId(roomId,roomUserId);
             roomVisitLogService.addLog(roomLive.getLiveId(),roomId,userId,type);