修改了配置信息
我的现场和新建现场的接口 给分页查询接口增加了一个字段,APPliveSceneController可能存在影响。
This commit is contained in:
parent
2cf0a5149b
commit
df07b3bf2a
@ -186,19 +186,21 @@ public class AppLiveSceneController extends AppAbstractController {
|
||||
/**
|
||||
* app现场审核列表
|
||||
*/
|
||||
// 2025年1月8日修改分页查询接口添加了一个栏目选择,该接口因此也添加了栏目选项
|
||||
@Login
|
||||
@AppPermission(permision = "app:live:scene:page")
|
||||
@ApiOperation("app现场审核列表")
|
||||
@GetMapping("/check/page")
|
||||
@ApiImplicitParams({@ApiImplicitParam(value = "标题", name = "title", paramType = "query", dataType = "String"),
|
||||
@ApiImplicitParam(value = "现场类型,1:视频现场,2:音频现场,3:图片现场,4:文字现场,5:混合现场,6:精品现场", name = "sceneType", paramType = "query", dataType = "int"),
|
||||
@ApiImplicitParam(value = "直播状态,0:预告;1:正在直播;2回顾", name = "liveState", paramType = "query", dataType = "Integer"),
|
||||
@ApiImplicitParam(value = "栏目", name = "channelId",paramType = "query", dataType = "int"),
|
||||
@ApiImplicitParam(value = "直播状态,0:预告;1:正在直播;2回顾", name = "liveState", paramType = "query", dataType = "Integer"),
|
||||
@ApiImplicitParam(value = "页码", name = "pageNo", defaultValue = "1", paramType = "query", dataType = "int"),
|
||||
@ApiImplicitParam(value = "页面大小", name = "pageSize", defaultValue = "15", paramType = "query", dataType = "int")})
|
||||
@ApiResponses({
|
||||
@ApiResponse(code = HttpStatus.SC_OK, message = "success", response = LiveSceneEntity.class, responseContainer = "List")})
|
||||
public R checkPage(String title, Integer sceneType, Integer liveState, Integer pageNo, Integer pageSize, Long tenantId) {
|
||||
Page page = liveSceneService.page(title, sceneType, "check", liveState, null == pageNo ? 1 : pageNo,null == pageSize ? 15 : pageSize, tenantId);
|
||||
public R checkPage(String title, Integer sceneType,Integer channelId, Integer liveState, Integer pageNo, Integer pageSize, Long tenantId) {
|
||||
Page page = liveSceneService.page(title, sceneType,channelId, "check", liveState, null == pageNo ? 1 : pageNo,null == pageSize ? 15 : pageSize, tenantId);
|
||||
return R.ok().put("page", page);
|
||||
}
|
||||
|
||||
|
||||
@ -70,16 +70,17 @@ public class LiveSceneController extends AbstractController {
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(value = "标题", name = "title", paramType = "query", dataType = "String"),
|
||||
@ApiImplicitParam(value = "现场类型,1:视频现场,2:音频现场,3:图片现场,4:文字现场,5:混合现场,6:精品现场", name = "sceneType", paramType = "query", dataType = "int"),
|
||||
@ApiImplicitParam(value = "现场状态,draft:草稿;check:待审;prod:成品 cycle:回收站", name = "ltype", paramType = "query", dataType = "String"),
|
||||
@ApiImplicitParam(value = "栏目", name = "channelId",paramType = "query", dataType = "int"),
|
||||
@ApiImplicitParam(value = "现场状态,draft:草稿;check:待审;prod:成品 cycle:回收站", name = "ltype", paramType = "query", dataType = "String"),
|
||||
@ApiImplicitParam(value = "直播状态,0:预告;1:正在直播;2回顾",name = "liveState",paramType = "query",dataType = "Integer"),
|
||||
@ApiImplicitParam(value = "页码", name = "pageNo", defaultValue = "1", paramType = "query", dataType = "int"),
|
||||
@ApiImplicitParam(value = "页面大小", name = "pageSize", defaultValue = "15",paramType = "query", dataType = "int")})
|
||||
public R page(String title, Integer sceneType, String ltype,Integer liveState, Integer pageNo, Integer pageSize, Long tenantId){
|
||||
public R page(String title, Integer sceneType,Integer channelId, String ltype,Integer liveState, Integer pageNo, Integer pageSize, Long tenantId){
|
||||
if(StringUtils.isNotBlank(ltype) && (ltype=="prod" || ltype.equals("prod"))){
|
||||
Page<SceneEntityVo> page = liveSceneService.pageProd(title, 5, ltype,liveState, null==pageNo?0:pageNo, null==pageSize?15:pageSize, tenantId);
|
||||
Page<SceneEntityVo> page = liveSceneService.pageProd(title, 5, channelId, ltype,liveState, null==pageNo?0:pageNo, null==pageSize?15:pageSize, tenantId);
|
||||
return R.ok().put("page", page);
|
||||
}else{
|
||||
Page page = liveSceneService.page(title, 5, ltype,liveState, null==pageNo?0:pageNo, null==pageSize?15:pageSize, tenantId);
|
||||
Page page = liveSceneService.page(title, 5, channelId, ltype,liveState, null==pageNo?0:pageNo, null==pageSize?15:pageSize, tenantId);
|
||||
return R.ok().put("page", page);
|
||||
}
|
||||
}
|
||||
@ -101,7 +102,7 @@ public class LiveSceneController extends AbstractController {
|
||||
}
|
||||
|
||||
@PostMapping("/selectLiveInfoList")
|
||||
@ApiOperation("现场记者列表数据")
|
||||
@ApiOperation("现场流列表数据")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(value = "现场id", name = "sceneId", defaultValue = "",paramType = "query", dataType = "int")})
|
||||
public R selectListBySceneId(Integer sceneId){
|
||||
@ -198,7 +199,7 @@ public class LiveSceneController extends AbstractController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除
|
||||
* 删除 现场表和第三方流
|
||||
*/
|
||||
@SysLog("删除现场信息")
|
||||
@PostMapping("/delete")
|
||||
@ -219,6 +220,11 @@ public class LiveSceneController extends AbstractController {
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 现场开播 仅仅修改了字段并刷新索引
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@SysLog("现场开播")
|
||||
@PostMapping("/startLive")
|
||||
@RequiresPermissions("live:livescene:startLive")
|
||||
|
||||
@ -30,7 +30,7 @@ import org.springframework.web.multipart.MultipartFile;
|
||||
*/
|
||||
public interface LiveSceneService extends IService<LiveSceneEntity> {
|
||||
|
||||
Page page(String title, Integer sceneType, String ltype,Integer liveState, Integer pageNo, Integer pageSize, Long tenantId);
|
||||
Page page(String title, Integer sceneType, Integer channelId, String ltype,Integer liveState, Integer pageNo, Integer pageSize, Long tenantId);
|
||||
|
||||
PageUtils page(String title, Integer sceneType,Integer userId, String ltype, Integer pageNo, Integer pageSize);
|
||||
|
||||
@ -148,7 +148,7 @@ public interface LiveSceneService extends IService<LiveSceneEntity> {
|
||||
/**
|
||||
* 成品现场【全部】
|
||||
*/
|
||||
Page<SceneEntityVo> pageProd(String title, Integer sceneType, String ltype,Integer liveState, Integer pageNo, Integer pageSize, Long tenantId);
|
||||
Page<SceneEntityVo> pageProd(String title, Integer sceneType, Integer channelId,String ltype,Integer liveState, Integer pageNo, Integer pageSize, Long tenantId);
|
||||
/**
|
||||
* 根据自动开播设置刷新现场状态
|
||||
* */
|
||||
|
||||
@ -102,7 +102,7 @@ public class LiveSceneServiceImpl extends ServiceImpl<LiveSceneDao, LiveSceneEnt
|
||||
|
||||
@Override
|
||||
@Transactional(readOnly = true)
|
||||
public Page page(String title, Integer sceneType, String ltype, Integer liveState, Integer pageNo,
|
||||
public Page page(String title, Integer sceneType, Integer channelId,String ltype, Integer liveState, Integer pageNo,
|
||||
Integer pageSize, Long tenantId) {
|
||||
EntityWrapper wrapper = new EntityWrapper<>(new LiveSceneEntity());
|
||||
// 标题
|
||||
@ -113,6 +113,12 @@ public class LiveSceneServiceImpl extends ServiceImpl<LiveSceneDao, LiveSceneEnt
|
||||
if (null != sceneType) {
|
||||
wrapper.eq("scene_type", sceneType);
|
||||
}
|
||||
if(channelId != null) {
|
||||
String channelName = liveChannelService.selectById(channelId).getName();
|
||||
if(channelName != null) {
|
||||
wrapper.eq("channels_name", channelName);
|
||||
}
|
||||
}
|
||||
if("cycle".equals(ltype)){
|
||||
wrapper.eq("delete_flag", 1);
|
||||
}else{
|
||||
@ -561,7 +567,7 @@ public class LiveSceneServiceImpl extends ServiceImpl<LiveSceneDao, LiveSceneEnt
|
||||
vo.setChannelIdList(channelIdList);
|
||||
vo.setChannelNameList(channelNameList);
|
||||
}
|
||||
|
||||
//获取审核员的用户名
|
||||
if(null != entity.getAuditorId()){
|
||||
SysUserEntity user = sysUserService.selectBaseById(Long.valueOf(entity.getAuditorId()));
|
||||
if (null != user) {
|
||||
@ -581,6 +587,7 @@ public class LiveSceneServiceImpl extends ServiceImpl<LiveSceneDao, LiveSceneEnt
|
||||
vo.setViewsShow(sceneCountVo == null ? 0 : sceneCountVo.getViewsShow());
|
||||
|
||||
// 20190408 TROY 现场详情增加wapurl
|
||||
//拼接移动端的URL
|
||||
String path;
|
||||
if (null == entity.getSceneType()) {
|
||||
path = SceneConstants.SceneType.IMAGE.getPath();
|
||||
@ -850,13 +857,14 @@ public class LiveSceneServiceImpl extends ServiceImpl<LiveSceneDao, LiveSceneEnt
|
||||
//20210426 yang 默认现场源默认转文字为 0
|
||||
liveSceneLiveInfoEntity.setIsTxt(0);
|
||||
|
||||
//live_scene_live_info生产一条记录、live_scene_live_info_ext生产一条记录
|
||||
saveLiveInfoAndEntity(liveSceneLiveInfoEntity, scene.getSceneSign(),
|
||||
DigestUtils.md5Hex(scene.getSceneSign()), scene.getLiveEnd(), scene.getSceneType());
|
||||
}
|
||||
|
||||
// 添加录制配置
|
||||
RpcResponse response = null;
|
||||
// TODO 根据现场类型状态进行控制
|
||||
// TODO 根据现场类型状态进行控制 0 1 4 6
|
||||
if (SceneConstants.SceneType.AUDIO.getKey().equals(scene.getSceneType()) || SceneConstants.SceneType.MERGE.getKey().equals(scene.getSceneType()) || SceneConstants.SceneType.VIDEO.getKey().equals(scene.getSceneType()) || SceneConstants.SceneType.VR.getKey().equals(scene.getSceneType())) {
|
||||
if (SceneConstants.SceneType.AUDIO.getKey().equals(scene.getSceneType()))
|
||||
response = liveClient.liveRecord().addLiveRecordVodMp3Config(scene.getSceneSign(), "*");
|
||||
@ -892,6 +900,16 @@ public class LiveSceneServiceImpl extends ServiceImpl<LiveSceneDao, LiveSceneEnt
|
||||
saveOrUpdateInfoExt(entity.getId(), appName, streamName, liveEndDate, sceneType, entity.getTenantId(),entity.getPullUrl());
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新流信息
|
||||
* @param infoId 流ID
|
||||
* @param appName AppName 用于生产流
|
||||
* @param streamName StreamName 用于生产流
|
||||
* @param liveEndDate 现场结束时间 用于生产流
|
||||
* @param sceneType 现场类型
|
||||
* @param tenantId 租户ID
|
||||
* @param pullUrl
|
||||
*/
|
||||
private void saveOrUpdateInfoExt(Integer infoId, String appName, String streamName, Date liveEndDate, Integer sceneType, Long tenantId,String pullUrl) {
|
||||
LiveSceneLiveInfoExtEntity infoExtEntity = liveSceneLiveInfoExtService.selectByInfoId(infoId);
|
||||
if (infoExtEntity == null) {
|
||||
@ -901,6 +919,7 @@ public class LiveSceneServiceImpl extends ServiceImpl<LiveSceneDao, LiveSceneEnt
|
||||
infoExtEntity.setTenantId(tenantId);
|
||||
}
|
||||
|
||||
//与appName, streamName, liveEndDate,domainName,key,autoTime(如果结束时间不存在或已经过期)
|
||||
LiveStreams streams = liveClient.liveStream().generateStreamUrls(appName, streamName, liveEndDate);
|
||||
String pushUrl = streams.getPushStreamUrl();
|
||||
String playUrlRmtp = streams.getLiveStreamUrls()[0];
|
||||
@ -1018,7 +1037,7 @@ public class LiveSceneServiceImpl extends ServiceImpl<LiveSceneDao, LiveSceneEnt
|
||||
sceneEntity.setDeleteFlag(SceneConstants.IS_DELETE);
|
||||
sceneEntity.setUpdateDate(new Date());
|
||||
this.updateById(sceneEntity);
|
||||
|
||||
//删除第三方流
|
||||
List<LiveSceneLiveInfoEntity> liveInfos = liveSceneLiveInfoService.selectLiveInfoByInfoType(sceneEntity.getId(),SceneConstants.InfoTypeEnum.THIRD.getType());
|
||||
if(liveInfos!=null && liveInfos.size()>0){
|
||||
for(LiveSceneLiveInfoEntity liveInfo : liveInfos){
|
||||
@ -1898,14 +1917,14 @@ public class LiveSceneServiceImpl extends ServiceImpl<LiveSceneDao, LiveSceneEnt
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 导播台分配
|
||||
*
|
||||
* @param id
|
||||
* 现场ID
|
||||
*/
|
||||
/**
|
||||
* 导播台分配 根据传入的 id 查找直播现场(LiveSceneEntity),然后为其分配导播台。
|
||||
* @param id 现场ID
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public R distribute(Integer id) {
|
||||
// 1.检查参数和现场状态。
|
||||
if (null == id) {
|
||||
return R.error("参数错误");
|
||||
}
|
||||
@ -1919,6 +1938,7 @@ public class LiveSceneServiceImpl extends ServiceImpl<LiveSceneDao, LiveSceneEnt
|
||||
if(liveSceneEntity.getLiveState() != 0){
|
||||
return R.error("该现场已经开始直播,不能分配导播台");
|
||||
}
|
||||
// 2.调用外部服务创建导播台并初始化配置。
|
||||
RpcResponse<Caster> response = liveClient.liveCaster()
|
||||
.createCasterAndInitCasterConfig(liveSceneEntity.getTitle());
|
||||
if (response.getResult() == ResponseResult.ERROR)
|
||||
@ -1948,8 +1968,9 @@ public class LiveSceneServiceImpl extends ServiceImpl<LiveSceneDao, LiveSceneEnt
|
||||
|
||||
tmpCaster.setSceneId(id);
|
||||
tmpCaster.setIsDelete(SceneConstants.NOT_DELETE);
|
||||
// 3.将导播台信息保存到数据库。
|
||||
liveCasterService.insert(tmpCaster);
|
||||
|
||||
// 4.更新直播现场的导播台 ID 和状态。
|
||||
liveSceneEntity.setCasterId(tmpCaster.getId());
|
||||
liveSceneEntity.setDirectState(SceneConstants.DIRECT_STATE_OFF);
|
||||
this.updateById(liveSceneEntity);
|
||||
@ -2627,7 +2648,7 @@ public class LiveSceneServiceImpl extends ServiceImpl<LiveSceneDao, LiveSceneEnt
|
||||
*/
|
||||
@Override
|
||||
@Transactional(readOnly = true)
|
||||
public Page<SceneEntityVo> pageProd(String title, Integer sceneType, String ltype,Integer liveState, Integer pageNo, Integer pageSize, Long tenantId) {
|
||||
public Page<SceneEntityVo> pageProd(String title, Integer sceneType, Integer channelId,String ltype,Integer liveState, Integer pageNo, Integer pageSize, Long tenantId) {
|
||||
// 检索记录
|
||||
Page<SceneEntityVo> page = new Page<SceneEntityVo>(pageNo, pageSize);
|
||||
Map<String, Object> params = new HashMap<String, Object>();
|
||||
@ -2639,7 +2660,12 @@ public class LiveSceneServiceImpl extends ServiceImpl<LiveSceneDao, LiveSceneEnt
|
||||
if (null != sceneType) {
|
||||
params.put("sceneType", sceneType);
|
||||
}
|
||||
|
||||
if(channelId != null){
|
||||
String channelName = liveChannelService.selectById(channelId).getName();
|
||||
if(channelName != null) {
|
||||
params.put("channels_name", channelName);
|
||||
}
|
||||
}
|
||||
params.put("deleteFlag", 0);
|
||||
// 现场状态
|
||||
params.put("ltype", SceneConstants.SCENE_PROD);
|
||||
|
||||
@ -20,7 +20,7 @@ zkdx:
|
||||
apiRegionId: cn-shanghai
|
||||
templateGroupId: 3798e90f4795f9661831e5c5d10ae01d
|
||||
record:
|
||||
domain-name: record.jay99.cn
|
||||
domain-name: push.jay99.cn
|
||||
vod-transcode-groupId-mp4: 3798e90f4795f9661831e5c5d10ae01d
|
||||
vod-transcode-groupId-mp3: d9050d459d7fb2e8c755e34c27f26284
|
||||
vod-record-category: 1000646979
|
||||
|
||||
@ -111,11 +111,14 @@ materia:
|
||||
# basePath: https://m.livejinan.cn/platform/
|
||||
SPT: /
|
||||
foreign:
|
||||
#移动端(WAP)访问的地址
|
||||
wapurl: http://zklive.zhongkedongxin.com
|
||||
#用于获取数据的接口地址
|
||||
dataurl: http://zklive.zhongkedongxin.com
|
||||
# mediaurl: http://test.vod.zhongkedongxin.com
|
||||
#TitleImage标题图地址、视频地址url拼接,前缀
|
||||
mediaurl: https://v.livejinan.cn
|
||||
#视频点播(VOD)服务的媒体资源地址
|
||||
vodmediaurl: http://test.vod.zhongkedongxin.com
|
||||
platform:
|
||||
tenant:
|
||||
|
||||
Loading…
Reference in New Issue
Block a user