|
|
@@ -6,6 +6,7 @@ import cn.hutool.core.util.ObjectUtil;
|
|
|
import com.alibaba.fastjson.JSON;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
|
|
|
+import com.fs.common.core.page.PageRequest;
|
|
|
import com.fs.common.exception.base.BaseException;
|
|
|
import com.fs.company.mapper.CompanyMapper;
|
|
|
import com.fs.core.config.WxMaConfiguration;
|
|
|
@@ -31,6 +32,7 @@ import com.fs.live.utils.ProcessManager;
|
|
|
import com.fs.live.vo.*;
|
|
|
import com.fs.system.domain.SysConfig;
|
|
|
import com.fs.system.service.ISysConfigService;
|
|
|
+import com.github.pagehelper.PageInfo;
|
|
|
import lombok.AllArgsConstructor;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import me.chanjar.weixin.common.error.WxErrorException;
|
|
|
@@ -448,6 +450,25 @@ public class LiveServiceImpl implements ILiveService
|
|
|
return "";
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public R liveListAll(PageRequest pageRequest) {
|
|
|
+ int start = (pageRequest.getCurrentPage() - 1) * pageRequest.getPageSize();
|
|
|
+ int end = pageRequest.getCurrentPage() * pageRequest.getPageSize() - 1;
|
|
|
+ List<Live> lives = baseMapper.liveListAll();
|
|
|
+
|
|
|
+ // 对结果进行分页处理
|
|
|
+ List<Live> pageLives = lives.stream()
|
|
|
+ .skip(start)
|
|
|
+ .limit(pageRequest.getPageSize())
|
|
|
+ .collect(Collectors.toList());
|
|
|
+
|
|
|
+ PageInfo<Live> result = new PageInfo<>(pageLives);
|
|
|
+ result.setTotal(lives.size());
|
|
|
+ return R.ok().put("data", result);
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 修改直播
|
|
|
*
|