|
@@ -374,19 +374,24 @@ public class RoomServiceImpl extends ServiceImpl<IRoomMapper, Room> implements I
|
|
|
roomuser.setHostStatus(0);
|
|
|
}
|
|
|
roomUserService.updateById(roomuser);
|
|
|
+ }else {
|
|
|
+ room.setLastLookTime(DateUtil.formatDateTime(new Date()));
|
|
|
+ if(type == 0) {
|
|
|
+ room.setHostStatus(1);
|
|
|
+ }
|
|
|
+ if(type == 1 ){ //离开房间
|
|
|
+ room.setHostStatus(0);
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
if(type == 0 ){ //加入房间,开启带看
|
|
|
- room.setHostStatus(1);
|
|
|
room.setRoomStatus(1);
|
|
|
roomVisitLogService.addLog(roomId,roomUserId,userId,type,1);
|
|
|
}
|
|
|
if(type == 1 ){ //离开房间
|
|
|
- room.setHostStatus(0);
|
|
|
roomVisitLogService.addLog(roomId,roomUserId,userId,type,1);
|
|
|
this.hostLeaveRoom(roomId,roomUserId);
|
|
|
}
|
|
|
- room.setLastLookTime(DateUtil.formatDateTime(new Date()));
|
|
|
this.updateById(room);
|
|
|
}
|
|
|
|