|
@@ -95,16 +95,20 @@ public class LiveRoomServiceImpl extends ServiceImpl<LiveRoomDao, LiveRoom> impl
|
|
|
*
|
|
|
* @param param 参数
|
|
|
* <p>roomType 房间类型 LIVE-直播课 TEMP-临时直播间
|
|
|
+ * <p>liveState 直播状态 0未开始 1已开始 2已结束
|
|
|
* <p>page 页数
|
|
|
* <p>rows 每页数量
|
|
|
*/
|
|
|
@Override
|
|
|
public PageInfo<LiveRoom> queryPageRoom(Map<String, Object> param) {
|
|
|
String roomType = WrapperUtil.toStr(param, "roomType");
|
|
|
+ Integer liveState = WrapperUtil.toInt(param, "liveState");
|
|
|
Long userId = getSysUser().getId();
|
|
|
Page<LiveRoom> pageInfo = PageUtil.getPageInfo(param);
|
|
|
IPage<LiveRoom> page = this.page(pageInfo, Wrappers.<LiveRoom>lambdaQuery()
|
|
|
.eq(WrapperUtil.StrPredicate.test(roomType), LiveRoom::getType, roomType)
|
|
|
+ .eq(WrapperUtil.ObjPredicate.test(liveState), LiveRoom::getLiveState, liveState)
|
|
|
+ .eq(LiveRoom::getRoomState, 0)
|
|
|
.eq(LiveRoom::getSpeakerId, userId)
|
|
|
);
|
|
|
return PageUtil.pageInfo(page);
|