|
@@ -22,6 +22,7 @@ import com.fdkankan.tk.common.util.JwtUtil;
|
|
|
import com.fdkankan.tk.common.util.RedisKeyUtil;
|
|
|
import com.fdkankan.tk.common.util.RoomUtil;
|
|
|
import com.fdkankan.tk.entity.Room;
|
|
|
+import com.fdkankan.tk.entity.RoomNum;
|
|
|
import com.fdkankan.tk.entity.RoomUser;
|
|
|
import com.fdkankan.tk.entity.WxUser;
|
|
|
import com.fdkankan.tk.exception.BusinessException;
|
|
@@ -559,4 +560,25 @@ public class RoomServiceImpl extends ServiceImpl<IRoomMapper, Room> implements I
|
|
|
wrapper.set(Room::getRoomStatus,status);
|
|
|
this.update(wrapper);
|
|
|
}
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public Room getRoomIdByNum(String num) {
|
|
|
+ List<RoomNum> roomNums = roomNumService.getByNum(num);
|
|
|
+ List<String> roomIds = roomNums.stream().map(RoomNum::getRoomId).collect(Collectors.toList());
|
|
|
+ return this.getUcenterPlatform(roomIds);
|
|
|
+ }
|
|
|
+
|
|
|
+ private Room getUcenterPlatform(List<String> roomIds) {
|
|
|
+ if(roomIds.isEmpty()){
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+ LambdaQueryWrapper<Room> wrapper = new LambdaQueryWrapper<>();
|
|
|
+ wrapper.in(Room::getRoomId,roomIds);
|
|
|
+ wrapper.eq(Room::getPlatform,"ucenter");
|
|
|
+ List<Room> list = this.list(wrapper);
|
|
|
+ if(list.isEmpty()){
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+ return list.get(0);
|
|
|
+ }
|
|
|
}
|