yangdamao 2 rokov pred
rodič
commit
dc393ffbab

+ 1 - 1
zhongzheng-admin/src/main/resources/application-dev.yml

@@ -128,7 +128,7 @@ wisdomExamRoom:
 certificate:
     host: http://192.168.1.38:8000/
 
-liveGotoURL: http://120.79.166.78:19014/
+liveGotoURL: http://
 
 enCodeVersion: develop
 

+ 1 - 1
zhongzheng-admin/src/main/resources/application-pre.yml

@@ -128,7 +128,7 @@ wisdomExamRoom:
 certificate:
     host: http://192.168.1.38:8000/
 
-liveGotoURL: http://120.79.166.78:19010/
+liveGotoURL: http://
 
 enCodeVersion: trial
 

+ 1 - 1
zhongzheng-admin/src/main/resources/application-prod.yml

@@ -128,7 +128,7 @@ wisdomExamRoom:
 certificate:
     host: https://m.xyyxt.net/
 
-liveGotoURL: https://web.xyyxt.net/
+liveGotoURL: https://
 
 enCodeVersion: release
 

+ 1 - 1
zhongzheng-admin/src/main/resources/application-trial.yml

@@ -128,7 +128,7 @@ wisdomExamRoom:
 certificate:
     host: https://m.xyyxt.net/
 
-liveGotoURL: https://web.xyyxt.net/
+liveGotoURL: https://
 
 enCodeVersion: release
 

+ 1 - 1
zhongzheng-api/src/main/resources/application-dev.yml

@@ -129,7 +129,7 @@ wisdomExamRoom:
 certificate:
     host: http://192.168.1.38:8000/
 
-liveGotoURL: http://120.79.166.78:19014/
+liveGotoURL: http://
 
 enCodeVersion: trial
 

+ 1 - 1
zhongzheng-api/src/main/resources/application-pre.yml

@@ -128,7 +128,7 @@ wisdomExamRoom:
 certificate:
     host: http://192.168.1.38:8000/
 
-liveGotoURL: http://120.79.166.78:19010/
+liveGotoURL: http://
 
 enCodeVersion: trial
 

+ 1 - 1
zhongzheng-api/src/main/resources/application-prod.yml

@@ -140,7 +140,7 @@ wisdomExamRoom:
 certificate:
     host: https://m.xyyxt.net/
 
-liveGotoURL: https://web.xyyxt.net/
+liveGotoURL: https://
 
 enCodeVersion: release
 

+ 1 - 1
zhongzheng-api/src/main/resources/application-trial.yml

@@ -140,7 +140,7 @@ wisdomExamRoom:
 certificate:
     host: https://m.xyyxt.net/
 
-liveGotoURL: https://web.xyyxt.net/
+liveGotoURL: https://
 
 enCodeVersion: release
 

+ 10 - 8
zhongzheng-system/src/main/java/com/zhongzheng/modules/course/service/impl/CourseSectionWatchPerServiceImpl.java

@@ -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/

+ 8 - 1
zhongzheng-system/src/main/java/com/zhongzheng/modules/course/service/impl/CourseTopicServiceImpl.java

@@ -10,6 +10,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.github.pagehelper.Page;
 import com.zhongzheng.common.exception.CustomException;
 import com.zhongzheng.common.utils.DateUtils;
+import com.zhongzheng.common.utils.ServletUtils;
 import com.zhongzheng.modules.course.bo.*;
 import com.zhongzheng.modules.course.domain.*;
 import com.zhongzheng.modules.course.mapper.CourseTopicMapper;
@@ -18,6 +19,7 @@ import com.zhongzheng.modules.course.vo.CourseTopicGoodsVo;
 import com.zhongzheng.modules.course.vo.CourseTopicVo;
 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.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
@@ -55,6 +57,9 @@ public class CourseTopicServiceImpl extends ServiceImpl<CourseTopicMapper, Cours
     @Autowired
     private IWxLoginService wxLoginService;
 
+    @Autowired
+    private ISysTenantService iSysTenantService;
+
     @Value("${liveGotoURL}")
     private String liveGotoURL;
 
@@ -66,6 +71,7 @@ public class CourseTopicServiceImpl extends ServiceImpl<CourseTopicMapper, Cours
 
     @Override
     public List<CourseTopicVo> queryList(CourseTopicQueryBo bo) {
+        String tenantId = ServletUtils.getRequest().getHeader("TenantId");
         LambdaQueryWrapper<CourseTopic> lqw = Wrappers.lambdaQuery();
         lqw.eq(bo.getEducationId() != null, CourseTopic::getEducationId, bo.getEducationId());
         lqw.like(StrUtil.isNotBlank(bo.getEducationName()), CourseTopic::getEducationName, bo.getEducationName());
@@ -81,7 +87,8 @@ public class CourseTopicServiceImpl extends ServiceImpl<CourseTopicMapper, Cours
             //小程序二维码和PC链接
             String enCode = wxLoginService.getTopicEnCode(item.getTopicId());
             item.setEnCode(enCode);
-            String url = String.format("%s%s?topicId=%s", liveGotoURL,"goodsTopic",item.getTopicId());
+            String domainPc =  iSysTenantService.getById(tenantId).getHostPc();
+            String url = String.format("%s%s/%s?topicId=%s", liveGotoURL,domainPc,"goodsTopic",item.getTopicId());
             item.setEnCodePC(url);
         });
         return courseTopicVos;