|
@@ -0,0 +1,143 @@
|
|
|
+package com.zhongzheng.modules.wisdom.service.impl;
|
|
|
+
|
|
|
+import cn.hutool.core.bean.BeanUtil;
|
|
|
+import cn.hutool.core.convert.Convert;
|
|
|
+import cn.hutool.core.lang.Validator;
|
|
|
+import com.alibaba.fastjson.JSON;
|
|
|
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
+import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
|
|
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
|
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
+import com.zhongzheng.common.core.domain.entity.SysUser;
|
|
|
+import com.zhongzheng.common.core.redis.RedisCache;
|
|
|
+import com.zhongzheng.common.exception.CustomException;
|
|
|
+import com.zhongzheng.common.utils.DateUtils;
|
|
|
+import com.zhongzheng.common.utils.http.HttpUtils;
|
|
|
+import com.zhongzheng.modules.alisms.vo.ResultBean;
|
|
|
+import com.zhongzheng.modules.base.service.IProfileTpService;
|
|
|
+import com.zhongzheng.modules.base.vo.ProfileTpVo;
|
|
|
+import com.zhongzheng.modules.course.bo.CourseChapterSectionQueryBo;
|
|
|
+import com.zhongzheng.modules.course.bo.CourseMenuQueryBo;
|
|
|
+import com.zhongzheng.modules.course.bo.CourseModuleChapterQueryBo;
|
|
|
+import com.zhongzheng.modules.course.bo.CourseSectionQueryBo;
|
|
|
+import com.zhongzheng.modules.course.domain.CourseSection;
|
|
|
+import com.zhongzheng.modules.course.domain.CourseSubject;
|
|
|
+import com.zhongzheng.modules.course.service.*;
|
|
|
+import com.zhongzheng.modules.course.vo.CourseChapterSectionVo;
|
|
|
+import com.zhongzheng.modules.course.vo.CourseMenuVo;
|
|
|
+import com.zhongzheng.modules.course.vo.CourseModuleChapterVo;
|
|
|
+import com.zhongzheng.modules.course.vo.CourseSectionVo;
|
|
|
+import com.zhongzheng.modules.exam.bo.ExamApplyQueryBo;
|
|
|
+import com.zhongzheng.modules.exam.bo.ExamBeforeQueryBo;
|
|
|
+import com.zhongzheng.modules.exam.domain.ExamApply;
|
|
|
+import com.zhongzheng.modules.exam.domain.ExamBefore;
|
|
|
+import com.zhongzheng.modules.exam.domain.ExamNumber;
|
|
|
+import com.zhongzheng.modules.exam.mapper.ExamApplyMapper;
|
|
|
+import com.zhongzheng.modules.exam.mapper.ExamBeforeMapper;
|
|
|
+import com.zhongzheng.modules.exam.mapper.ExamNumberMapper;
|
|
|
+import com.zhongzheng.modules.exam.vo.ExamApplyVo;
|
|
|
+import com.zhongzheng.modules.exam.vo.ExamBeforeVo;
|
|
|
+import com.zhongzheng.modules.exam.vo.ExamUserApplyVo;
|
|
|
+import com.zhongzheng.modules.goods.bo.GoodsQueryBo;
|
|
|
+import com.zhongzheng.modules.goods.service.IGoodsCourseService;
|
|
|
+import com.zhongzheng.modules.goods.service.IGoodsService;
|
|
|
+import com.zhongzheng.modules.goods.vo.GoodsCourseVo;
|
|
|
+import com.zhongzheng.modules.goods.vo.GoodsVo;
|
|
|
+import com.zhongzheng.modules.grade.bo.ClassGradeUserQueryBo;
|
|
|
+import com.zhongzheng.modules.grade.domain.ClassGradeUserTemp;
|
|
|
+import com.zhongzheng.modules.grade.domain.UserPeriod;
|
|
|
+import com.zhongzheng.modules.grade.domain.UserPeriodStatus;
|
|
|
+import com.zhongzheng.modules.grade.service.*;
|
|
|
+import com.zhongzheng.modules.grade.vo.ClassGradeUserGoodsVo;
|
|
|
+import com.zhongzheng.modules.grade.vo.ClassGradeVo;
|
|
|
+import com.zhongzheng.modules.grade.vo.ClassPeriodVo;
|
|
|
+import com.zhongzheng.modules.inform.bo.InformQueryBo;
|
|
|
+import com.zhongzheng.modules.inform.bo.InformSysUserAddBo;
|
|
|
+import com.zhongzheng.modules.inform.bo.InformUserAddBo;
|
|
|
+import com.zhongzheng.modules.inform.domain.InformUser;
|
|
|
+import com.zhongzheng.modules.inform.service.IInformRemindService;
|
|
|
+import com.zhongzheng.modules.inform.service.IInformService;
|
|
|
+import com.zhongzheng.modules.inform.service.IInformSysUserService;
|
|
|
+import com.zhongzheng.modules.inform.service.IInformUserService;
|
|
|
+import com.zhongzheng.modules.inform.vo.InformRemindVo;
|
|
|
+import com.zhongzheng.modules.inform.vo.InformVo;
|
|
|
+import com.zhongzheng.modules.mock.domain.MockApply;
|
|
|
+import com.zhongzheng.modules.mock.domain.MockMajorSubject;
|
|
|
+import com.zhongzheng.modules.mock.domain.MockMajorSubjectTime;
|
|
|
+import com.zhongzheng.modules.mock.service.IMockApplyService;
|
|
|
+import com.zhongzheng.modules.mock.service.IMockMajorSubjectGoodsService;
|
|
|
+import com.zhongzheng.modules.mock.service.IMockMajorSubjectService;
|
|
|
+import com.zhongzheng.modules.mock.service.IMockMajorSubjectTimeService;
|
|
|
+import com.zhongzheng.modules.mock.vo.MockApplyVo;
|
|
|
+import com.zhongzheng.modules.order.bo.OrderQueryBo;
|
|
|
+import com.zhongzheng.modules.order.domain.Order;
|
|
|
+import com.zhongzheng.modules.order.mapper.OrderGoodsMapper;
|
|
|
+import com.zhongzheng.modules.order.mapper.OrderMapper;
|
|
|
+import com.zhongzheng.modules.order.service.IOrderBusinessService;
|
|
|
+import com.zhongzheng.modules.order.service.IOrderGoodsService;
|
|
|
+import com.zhongzheng.modules.order.service.IOrderService;
|
|
|
+import com.zhongzheng.modules.order.vo.OrderGoodsVo;
|
|
|
+import com.zhongzheng.modules.order.vo.OrderListVo;
|
|
|
+import com.zhongzheng.modules.polyv.bo.PolyvLiveQueryBo;
|
|
|
+import com.zhongzheng.modules.polyv.domain.PolyvVideo;
|
|
|
+import com.zhongzheng.modules.polyv.mapper.PolyvVideoMapper;
|
|
|
+import com.zhongzheng.modules.polyv.service.IPolyvLiveService;
|
|
|
+import com.zhongzheng.modules.schedule.service.IScheduleService;
|
|
|
+import com.zhongzheng.modules.system.service.ISysUserService;
|
|
|
+import com.zhongzheng.modules.user.bo.*;
|
|
|
+import com.zhongzheng.modules.user.domain.*;
|
|
|
+import com.zhongzheng.modules.user.mapper.UserPlanMapper;
|
|
|
+import com.zhongzheng.modules.user.mapper.UserStudyRecordMapper;
|
|
|
+import com.zhongzheng.modules.user.service.*;
|
|
|
+import com.zhongzheng.modules.user.vo.*;
|
|
|
+import com.zhongzheng.modules.wisdom.service.IWisdomService;
|
|
|
+import com.zhongzheng.modules.wx.service.IWxLoginService;
|
|
|
+import net.polyv.live.v1.entity.channel.playback.LiveChannelVideoListResponse;
|
|
|
+import net.polyv.live.v1.entity.channel.playback.LiveListChannelVideoLibraryResponse;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.beans.factory.annotation.Value;
|
|
|
+import org.springframework.stereotype.Service;
|
|
|
+import org.springframework.util.CollectionUtils;
|
|
|
+
|
|
|
+import java.text.ParseException;
|
|
|
+import java.text.SimpleDateFormat;
|
|
|
+import java.util.*;
|
|
|
+import java.util.stream.Collectors;
|
|
|
+
|
|
|
+
|
|
|
+@Service
|
|
|
+public class WisdomServiceImpl implements IWisdomService {
|
|
|
+
|
|
|
+ @Value("${wisdomExamRoom.mchid}")
|
|
|
+ private String mchid;
|
|
|
+
|
|
|
+ @Value("${wisdomExamRoom.appid}")
|
|
|
+ private String appid;
|
|
|
+
|
|
|
+ @Value("${wisdomExamRoom.app_secret}")
|
|
|
+ private String app_secret;
|
|
|
+
|
|
|
+ @Value("${wisdomExamRoom.host}")
|
|
|
+ private String host;
|
|
|
+
|
|
|
+ private String authorizationUrl = "/exam/api/authorization";
|
|
|
+
|
|
|
+ private String getRoomListUrl = "/exam/api/rooms";
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private RedisCache redisCache;
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public void authorization() {
|
|
|
+ String url = host + authorizationUrl;
|
|
|
+ Map<String, String> paramMap = new HashMap<>();
|
|
|
+ paramMap.put("mchid",mchid);
|
|
|
+ paramMap.put("appid",appid);
|
|
|
+ paramMap.put("app_secret",app_secret);
|
|
|
+ try{
|
|
|
+ String result = HttpUtils.postFormBody(url,paramMap);
|
|
|
+ }catch (Exception e){
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|