|
|
@@ -55,6 +55,7 @@ import org.apache.http.impl.client.CloseableHttpClient;
|
|
|
import org.apache.http.impl.client.HttpClients;
|
|
|
import org.apache.http.util.EntityUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.beans.factory.annotation.Value;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
import com.fs.common.utils.sign.Md5Utils;
|
|
|
@@ -123,7 +124,7 @@ public class LiveServiceImpl implements ILiveService
|
|
|
private CompanyMapper companyMapper;
|
|
|
@Autowired
|
|
|
private LiveCouponMapper liveCouponMapper;
|
|
|
-
|
|
|
+
|
|
|
@Autowired
|
|
|
LiveTagConfigMapper liveTagConfigMapper;
|
|
|
|
|
|
@@ -282,7 +283,7 @@ public class LiveServiceImpl implements ILiveService
|
|
|
}
|
|
|
}
|
|
|
liveVo.setCompletionPointsEnabled(completionPointsEnabled);
|
|
|
-
|
|
|
+
|
|
|
LiveVideo liveVideo = liveVideoService.selectLiveVideoByLiveIdAndType(id, 3);
|
|
|
if (liveVideo != null) {
|
|
|
liveVo.setPreviewUrl(liveVideo.getVideoUrl());
|
|
|
@@ -636,7 +637,7 @@ public class LiveServiceImpl implements ILiveService
|
|
|
liveTagConfigMapper.deleteByLiveId(live.getLiveId());
|
|
|
insertLiveTagConfig(live.getLiveTagList(),live.getLiveId(),live.getCreateBy());
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
return result;
|
|
|
}
|
|
|
|
|
|
@@ -937,8 +938,14 @@ public class LiveServiceImpl implements ILiveService
|
|
|
if (live.getCompanyId() != null && exist.getCompanyId() != null && !Objects.equals(exist.getCompanyId(), live.getCompanyId())) {
|
|
|
return R.error("您没有权限操作此直播间");
|
|
|
}
|
|
|
- String rtmpPushUrl = generateRtmpPushUrl("rtmp://200149.push.tlivecloud.com", "live", exist.getLiveId().toString());
|
|
|
- String hlvPlayUrl = generateHlvPlayUrl("https://live.test.ifeiyu100.com", "live", exist.getLiveId().toString());
|
|
|
+
|
|
|
+ SysConfig sysConfig = sysConfigService.selectConfigByConfigKey("living.config");
|
|
|
+ Map<String, String> livingConfigMap = JSON.parseObject(sysConfig.getConfigValue(), Map.class);
|
|
|
+ if (livingConfigMap == null || livingConfigMap.isEmpty()) {
|
|
|
+ return R.error("缺失直播配置");
|
|
|
+ }
|
|
|
+ String rtmpPushUrl = generateRtmpPushUrl(livingConfigMap.get("domain"), livingConfigMap.get("app"), exist.getLiveId().toString());
|
|
|
+ String hlvPlayUrl = generateHlvPlayUrl(livingConfigMap.get("http"), livingConfigMap.get("app"), exist.getLiveId().toString());
|
|
|
Date now = new Date();
|
|
|
exist.setRtmpUrl(rtmpPushUrl);
|
|
|
exist.setFlvHlsUrl(hlvPlayUrl);
|