🆕 #1863 【小程序】增加删除直播间、编辑直播间、获取直播间推流地址、获取直播间分享二维码等接口
This commit is contained in:
@@ -37,12 +37,13 @@ public class WxMaLiveServiceImplTest {
|
||||
roomInfo.setName("订阅通知直播间");
|
||||
roomInfo.setCoverImg(mediaUpload.getMediaId());
|
||||
Calendar c = Calendar.getInstance();
|
||||
c.set(2020, Calendar.SEPTEMBER, 10, 8, 0);
|
||||
c.set(2020, Calendar.DECEMBER, 10, 8, 0);
|
||||
roomInfo.setStartTime(c.getTimeInMillis() / 1000);
|
||||
c.set(2020, Calendar.SEPTEMBER, 10, 12, 0);
|
||||
c.set(2020, Calendar.DECEMBER, 10, 12, 0);
|
||||
roomInfo.setEndTime(c.getTimeInMillis() / 1000);
|
||||
roomInfo.setAnchorName("鹏军_专业小程序开发");
|
||||
roomInfo.setAnchorWechat("pengjun939961241");
|
||||
roomInfo.setCreaterWechat("pengjun939961241");
|
||||
roomInfo.setShareImg(mediaUpload.getMediaId());
|
||||
roomInfo.setType(1);
|
||||
roomInfo.setScreenType(1);
|
||||
@@ -53,6 +54,48 @@ public class WxMaLiveServiceImplTest {
|
||||
System.out.println(roomId);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void deletRoom() throws Exception {
|
||||
this.wxService.getLiveService().deleteRoom(29);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void editRoom() throws Exception {
|
||||
//上传临时素材
|
||||
// WxMediaUploadResult mediaUpload = this.wxService.getMediaService().uploadMedia("image", new File("E:\\1.png"));
|
||||
|
||||
WxMaLiveRoomInfo roomInfo = new WxMaLiveRoomInfo();
|
||||
roomInfo.setId(39);
|
||||
roomInfo.setName("修改订阅通知直播间");
|
||||
roomInfo.setCoverImg("http://mmbiz.qpic.cn/mmbiz_png/omYktZNGamuBLBYlP2FjpIL2AHoiayH8HXeZRibtXDMesHn5aevEaM4etUVwfnX1HHqrXBDY3KPgT8MIlqbtqX8Q/0");
|
||||
Calendar c = Calendar.getInstance();
|
||||
c.set(2021, Calendar.SEPTEMBER, 10, 8, 0);
|
||||
roomInfo.setStartTime(c.getTimeInMillis() / 1000);
|
||||
c.set(2021, Calendar.SEPTEMBER, 10, 12, 0);
|
||||
roomInfo.setEndTime(c.getTimeInMillis() / 1000);
|
||||
roomInfo.setAnchorName("鹏军_专业小程序开发");
|
||||
roomInfo.setAnchorWechat("pengjun939961241");
|
||||
roomInfo.setShareImg("http://mmbiz.qpic.cn/mmbiz_png/omYktZNGamuBLBYlP2FjpIL2AHoiayH8HXeZRibtXDMesHn5aevEaM4etUVwfnX1HHqrXBDY3KPgT8MIlqbtqX8Q/0");
|
||||
roomInfo.setType(1);
|
||||
roomInfo.setScreenType(1);
|
||||
roomInfo.setCloseLike(0);
|
||||
roomInfo.setCloseGoods(0);
|
||||
roomInfo.setCloseComment(0);
|
||||
boolean editRoom = this.wxService.getLiveService().editRoom(roomInfo);
|
||||
System.out.println(editRoom);
|
||||
}
|
||||
@Test
|
||||
public void getPushUrl() throws Exception {
|
||||
String result = this.wxService.getLiveService().getPushUrl(39);
|
||||
System.out.println(result);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void getSharedCode() throws Exception {
|
||||
String result = this.wxService.getLiveService().getSharedCode(39, null);
|
||||
System.out.println(result);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void getLiveInfo() throws Exception {
|
||||
WxMaLiveResult list = this.wxService.getLiveService().getLiveInfo(0, 10);
|
||||
|
||||
Reference in New Issue
Block a user