|
@@ -335,8 +335,8 @@ public class RoomServiceImpl extends ServiceImpl<IRoomMapper, Room> implements I
|
|
|
* role follower leader
|
|
|
*/
|
|
|
@Override
|
|
|
- public void inOrOutRoom(String roomId, String role, Integer type,String userId) {
|
|
|
- log.info("inOrOutRoom--roomId:{},role:{},type:{},userId:{}",roomId,role,type,userId);
|
|
|
+ public void inOrOutRoom(String roomId, String role, Integer type,String userId,String platform) {
|
|
|
+ log.info("inOrOutRoom--roomId:{},role:{},type:{},userId:{},platform:{}",roomId,role,type,userId,platform);
|
|
|
if(roomId == null || StringUtils.isBlank(role)
|
|
|
|| ( !role.equals("leader") && !role.equals("customer")) ){
|
|
|
throw new BusinessException(ResultCode.PARAM_MISS);
|
|
@@ -362,7 +362,9 @@ public class RoomServiceImpl extends ServiceImpl<IRoomMapper, Room> implements I
|
|
|
}
|
|
|
|
|
|
if(role.equals("customer")){
|
|
|
- roomVisitLogService.addLog(roomId,roomUserId,userId,type,0);
|
|
|
+ if(!(StringUtils.isNotBlank(platform) && platform.equals("fd"))){
|
|
|
+ roomVisitLogService.addLog(roomId,roomUserId,userId,type,0);
|
|
|
+ }
|
|
|
this.updateById(room);
|
|
|
return;
|
|
|
}
|
|
@@ -390,11 +392,15 @@ public class RoomServiceImpl extends ServiceImpl<IRoomMapper, Room> implements I
|
|
|
|
|
|
if(type == 0 ){ //加入房间,开启带看
|
|
|
room.setRoomStatus(1);
|
|
|
- roomVisitLogService.addLog(roomId,roomUserId,userId,type,1);
|
|
|
+ if(!(StringUtils.isNotBlank(platform) && platform.equals("fd"))){
|
|
|
+ roomVisitLogService.addLog(roomId,roomUserId,userId,type,1);
|
|
|
+ }
|
|
|
}
|
|
|
if(type == 1 ){ //离开房间
|
|
|
- roomVisitLogService.addLog(roomId,roomUserId,userId,type,1);
|
|
|
- this.hostLeaveRoom(roomId,roomUserId);
|
|
|
+ if(!(StringUtils.isNotBlank(platform) && platform.equals("fd"))){
|
|
|
+ roomVisitLogService.addLog(roomId,roomUserId,userId,type,1);
|
|
|
+ this.hostLeaveRoom(roomId,roomUserId);
|
|
|
+ }
|
|
|
}
|
|
|
this.updateById(room);
|
|
|
}
|
|
@@ -409,6 +415,7 @@ public class RoomServiceImpl extends ServiceImpl<IRoomMapper, Room> implements I
|
|
|
public List<Room> getRunningRoom() {
|
|
|
LambdaQueryWrapper<Room> wrapper = new LambdaQueryWrapper<>();
|
|
|
wrapper.in(Room::getRoomStatus,0,1);
|
|
|
+ wrapper.eq(Room::getPlatform,"4dkankan");
|
|
|
return this.list(wrapper);
|
|
|
}
|
|
|
|
|
@@ -466,4 +473,19 @@ public class RoomServiceImpl extends ServiceImpl<IRoomMapper, Room> implements I
|
|
|
return this.list(wrapper);
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public void dissolveTheRoom(String roomId) {
|
|
|
+ Room room = this.getById(roomId);
|
|
|
+ if(room == null){
|
|
|
+ throw new BusinessException(ResultCode.ROOM_MISS);
|
|
|
+ }
|
|
|
+ if(room.getPlatform().equals("4dkankan")){
|
|
|
+ throw new BusinessException(ResultCode.ROOM_DISSOLVE_ERROR);
|
|
|
+ }
|
|
|
+ LambdaUpdateWrapper<Room> wrapper = new LambdaUpdateWrapper<>();
|
|
|
+ wrapper.eq(Room::getRoomId,room.getRoomId());
|
|
|
+ wrapper.set(Room::getRoomStatus,2);
|
|
|
+ this.update(wrapper);
|
|
|
+ }
|
|
|
}
|