|
@@ -1,6 +1,8 @@
|
|
|
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;
|
|
@@ -21,10 +23,13 @@ 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.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;
|
|
|
|
|
@@ -55,7 +60,12 @@ public class CourseSectionWatchPerServiceImpl extends ServiceImpl<CourseSectionW
|
|
|
// String url = "";
|
|
|
String live = "living-room/";
|
|
|
vo.setEnCode(wxLoginService.getLiveEnCode(bo));
|
|
|
- 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 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);
|
|
|
// //生成微信小程序码
|
|
|
// switch (bo.getSectionType()){
|
|
|
// case 2://直播 living-room/
|