添加直播回放接口
This commit is contained in:
@ -8,6 +8,7 @@
|
||||
*/
|
||||
package co.yixiang.modules.wechat.service;
|
||||
|
||||
import cn.binarywang.wx.miniapp.bean.WxMaLiveResult;
|
||||
import co.yixiang.common.service.BaseService;
|
||||
import co.yixiang.modules.wechat.domain.YxWechatLive;
|
||||
import co.yixiang.modules.wechat.service.dto.YxWechatLiveDto;
|
||||
@ -60,4 +61,11 @@ public interface YxWechatLiveService extends BaseService<YxWechatLive>{
|
||||
* @throws IOException /
|
||||
*/
|
||||
void download(List<YxWechatLiveDto> all, HttpServletResponse response) throws IOException;
|
||||
|
||||
/**
|
||||
* 获取直播回放
|
||||
* @param roomId
|
||||
* @return
|
||||
*/
|
||||
List<WxMaLiveResult.LiveReplay> getLiveReplay(Integer roomId);
|
||||
}
|
||||
|
@ -144,7 +144,18 @@ public class YxWechatLiveServiceImpl extends BaseServiceImpl<YxWechatLiveMapper,
|
||||
return baseMapper.selectList(QueryHelpPlus.getPredicate(YxWechatLive.class, criteria));
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
//@Cacheable
|
||||
public List<WxMaLiveResult.LiveReplay> getLiveReplay(Integer roomId){
|
||||
WxMaService wxMaService = WxMaConfiguration.getWxMaService();
|
||||
WxMaLiveResult get_replay = new WxMaLiveResult();
|
||||
try {
|
||||
get_replay = wxMaService.getLiveService().getLiveReplay("get_replay", roomId, 0, 100);
|
||||
} catch (WxErrorException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return get_replay.getLiveReplay();
|
||||
}
|
||||
@Override
|
||||
public void download(List<YxWechatLiveDto> all, HttpServletResponse response) throws IOException {
|
||||
List<Map<String, Object>> list = new ArrayList<>();
|
||||
|
Reference in New Issue
Block a user