|
@@ -2,14 +2,12 @@ package com.zhongzheng.modules.course.service.impl;
|
|
|
|
|
|
import cn.hutool.core.bean.BeanUtil;
|
|
|
import cn.hutool.core.codec.Base64;
|
|
|
-import cn.hutool.core.codec.Base64Decoder;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
-import com.baomidou.mybatisplus.core.toolkit.BeanUtils;
|
|
|
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
|
|
|
import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
-import com.zhongzheng.common.exception.CustomException;
|
|
|
import com.zhongzheng.common.utils.DateUtils;
|
|
|
+import com.zhongzheng.common.utils.ServletUtils;
|
|
|
import com.zhongzheng.modules.course.bo.CheckSectionWatchVo;
|
|
|
import com.zhongzheng.modules.course.bo.SectionWatchPerAddBo;
|
|
|
import com.zhongzheng.modules.course.bo.SectionWatchPerBo;
|
|
@@ -22,15 +20,12 @@ import com.zhongzheng.modules.course.service.ICourseSectionWatchPerService;
|
|
|
import com.zhongzheng.modules.course.vo.CourseSectionWatchPerVo;
|
|
|
import com.zhongzheng.modules.goods.domain.Goods;
|
|
|
import com.zhongzheng.modules.goods.service.IGoodsService;
|
|
|
+import com.zhongzheng.modules.system.service.ISysTenantService;
|
|
|
import com.zhongzheng.modules.wx.service.IWxLoginService;
|
|
|
-import org.apache.commons.codec.digest.DigestUtils;
|
|
|
-import org.bouncycastle.pqc.math.linearalgebra.ByteUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
-import java.security.MessageDigest;
|
|
|
-import java.util.Date;
|
|
|
import java.util.List;
|
|
|
|
|
|
/**
|
|
@@ -49,12 +44,16 @@ public class CourseSectionWatchPerServiceImpl extends ServiceImpl<CourseSectionW
|
|
|
@Autowired
|
|
|
private ICourseSectionService courseSectionService;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private ISysTenantService iSysTenantService;
|
|
|
+
|
|
|
@Value("${liveGotoURL}")
|
|
|
private String liveGotoURL;
|
|
|
|
|
|
@Override
|
|
|
public CourseSectionWatchPerVo getSectionWatchPer(SectionWatchPerBo bo) {
|
|
|
CourseSectionWatchPerVo vo = new CourseSectionWatchPerVo();
|
|
|
+ String tenantId = ServletUtils.getRequest().getHeader("TenantId");
|
|
|
//获取课程节信息
|
|
|
CourseSection section = courseSectionService.getById(bo.getSectionId());
|
|
|
// String url = "";
|
|
@@ -63,9 +62,12 @@ public class CourseSectionWatchPerServiceImpl extends ServiceImpl<CourseSectionW
|
|
|
String format = String.format("cid=%s&gid=%s&sid=%s", bo.getCourseId(), bo.getGoodsId(), bo.getSectionId());
|
|
|
|
|
|
String s = Base64.encode(format);
|
|
|
+
|
|
|
// String s = DigestUtils.md5Hex(format);
|
|
|
// String url = String.format("%s%s%s?a=1&cid=%s&gid=%s&sid=%s", liveGotoURL,live,section.getLiveUrl(), bo.getCourseId(), bo.getGoodsId(), bo.getSectionId());
|
|
|
- String url = String.format("%s%s%s?a=1&%s", liveGotoURL,live,section.getLiveUrl(), s);
|
|
|
+ // https://web.xyyxt.net/
|
|
|
+ String domainPc = iSysTenantService.getById(tenantId).getHostPc();
|
|
|
+ String url = String.format("%s%s/%s%s?a=1&%s",liveGotoURL, domainPc,live,section.getLiveUrl(), s);
|
|
|
// //生成微信小程序码
|
|
|
// switch (bo.getSectionType()){
|
|
|
// case 2://直播 living-room/
|