|
|
@@ -270,6 +270,19 @@ public class LiveServiceImpl implements ILiveService
|
|
|
// liveVo.setStoreId(storeId);
|
|
|
BeanUtils.copyProperties(live, liveVo);
|
|
|
liveVo.setNowDuration(200L);
|
|
|
+
|
|
|
+ Boolean completionPointsEnabled = false;
|
|
|
+ String configJson = live.getConfigJson();
|
|
|
+ if (StringUtils.isNotEmpty(configJson)) {
|
|
|
+ try {
|
|
|
+ JSONObject jsonConfig = JSON.parseObject(configJson);
|
|
|
+ completionPointsEnabled = jsonConfig.getBooleanValue("enabled");
|
|
|
+ } catch (Exception e) {
|
|
|
+ log.warn("解析直播完课积分配置失败, liveId={}", id, e);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ liveVo.setCompletionPointsEnabled(completionPointsEnabled);
|
|
|
+
|
|
|
LiveVideo liveVideo = liveVideoService.selectLiveVideoByLiveIdAndType(id, 3);
|
|
|
if (liveVideo != null) {
|
|
|
liveVo.setPreviewUrl(liveVideo.getVideoUrl());
|