|
@@ -1005,6 +1005,8 @@ public class GoodsServiceImpl extends ServiceImpl<GoodsMapper, Goods> implements
|
|
if (CollectionUtils.isEmpty(voList)) {
|
|
if (CollectionUtils.isEmpty(voList)) {
|
|
return new ArrayList<>();
|
|
return new ArrayList<>();
|
|
}
|
|
}
|
|
|
|
+ //当前时间戳
|
|
|
|
+ Long nowTime = DateUtils.getNowTime();
|
|
voList.forEach(goodsVo -> {
|
|
voList.forEach(goodsVo -> {
|
|
User user = users.stream().filter(x -> x.getTenantId().equals(goodsVo.getTenantId())).findFirst().orElse(null);
|
|
User user = users.stream().filter(x -> x.getTenantId().equals(goodsVo.getTenantId())).findFirst().orElse(null);
|
|
//已学和未学
|
|
//已学和未学
|
|
@@ -1016,6 +1018,7 @@ public class GoodsServiceImpl extends ServiceImpl<GoodsMapper, Goods> implements
|
|
subjectStudyRecordQueryBo.setOrderGoodsId(goodsVo.getOrderGoodsId());
|
|
subjectStudyRecordQueryBo.setOrderGoodsId(goodsVo.getOrderGoodsId());
|
|
subjectStudyRecordQueryBo.setGradeId(goodsVo.getGradeId());
|
|
subjectStudyRecordQueryBo.setGradeId(goodsVo.getGradeId());
|
|
subjectStudyRecordQueryBo.setTenantId(goodsVo.getTenantId());
|
|
subjectStudyRecordQueryBo.setTenantId(goodsVo.getTenantId());
|
|
|
|
+ Long tenantId = goodsVo.getTenantId();
|
|
List<SubjectStudyRecordVo> subjectStudyRecordVos = iUserStudyRecordService.listSubjectTenant(subjectStudyRecordQueryBo);
|
|
List<SubjectStudyRecordVo> subjectStudyRecordVos = iUserStudyRecordService.listSubjectTenant(subjectStudyRecordQueryBo);
|
|
for (SubjectStudyRecordVo subjectStudyRecordVo : subjectStudyRecordVos) {
|
|
for (SubjectStudyRecordVo subjectStudyRecordVo : subjectStudyRecordVos) {
|
|
secLong = new BigDecimal(secLong.toString()).add(new BigDecimal(subjectStudyRecordVo.getSectionNum().toString())).longValue();
|
|
secLong = new BigDecimal(secLong.toString()).add(new BigDecimal(subjectStudyRecordVo.getSectionNum().toString())).longValue();
|
|
@@ -1055,22 +1058,25 @@ public class GoodsServiceImpl extends ServiceImpl<GoodsMapper, Goods> implements
|
|
if (CollectionUtils.isNotEmpty(courseIds) && courseIds.size() == 1) {
|
|
if (CollectionUtils.isNotEmpty(courseIds) && courseIds.size() == 1) {
|
|
goodsVo.setCourseId(courseIds.get(0));
|
|
goodsVo.setCourseId(courseIds.get(0));
|
|
}
|
|
}
|
|
-
|
|
|
|
if (goodsVo.getCourseType() == 2) {
|
|
if (goodsVo.getCourseType() == 2) {
|
|
//题库
|
|
//题库
|
|
- goodsVo.setToWeAppPagePath("/pages/questionBank/index");
|
|
|
|
|
|
+ goodsVo.setToWeAppPagePath("/pages/questionBank/index?skipPort="+nowTime);
|
|
} else if (goodsVo.getCourseType() == 6) {
|
|
} else if (goodsVo.getCourseType() == 6) {
|
|
//直播
|
|
//直播
|
|
- goodsVo.setToWeAppPagePath(String.format("/pages3/live/detail?orderGoodsId=%s&goodsId=%s&gradeId=0&courseId=%s",
|
|
|
|
- goodsVo.getOrderGoodsId(), goodsVo.getGoodsId(), goodsVo.getCourseId()));
|
|
|
|
|
|
+ goodsVo.setToWeAppPagePath(String.format("/pages3/live/detail?orderGoodsId=%s&goodsId=%s&gradeId=0&courseId=%s&skipPort=%s",
|
|
|
|
+ goodsVo.getOrderGoodsId(), goodsVo.getGoodsId(), goodsVo.getCourseId(),nowTime));
|
|
} else {
|
|
} else {
|
|
//视频
|
|
//视频
|
|
- goodsVo.setToWeAppPagePath(String.format("/pages3/polyv/detail?id=%s&goodsId=%s&orderGoodsId=%s&gradeId=%s",
|
|
|
|
- goodsVo.getCourseId(), goodsVo.getGoodsId(), goodsVo.getOrderGoodsId(), goodsVo.getGradeId()));
|
|
|
|
|
|
+ goodsVo.setToWeAppPagePath(String.format("/pages3/polyv/detail?id=%s&goodsId=%s&orderGoodsId=%s&gradeId=%s&skipPort=%s",
|
|
|
|
+ goodsVo.getCourseId(), goodsVo.getGoodsId(), goodsVo.getOrderGoodsId(), goodsVo.getGradeId(),nowTime));
|
|
}
|
|
}
|
|
|
|
+ UserPhoneBo phoneBo = new UserPhoneBo();
|
|
|
|
+ phoneBo.setTelphone(bo.getTelphone());
|
|
|
|
+ phoneBo.setTenantId(tenantId);
|
|
|
|
+ //缓存用户手机号码 30分钟失效
|
|
|
|
+ redisCache.setCacheObjectTenant(tenantId+":"+nowTime.toString(), JSONObject.toJSONString(phoneBo), 30, TimeUnit.MINUTES);
|
|
|
|
|
|
});
|
|
});
|
|
-
|
|
|
|
return voList;
|
|
return voList;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -1220,7 +1226,7 @@ public class GoodsServiceImpl extends ServiceImpl<GoodsMapper, Goods> implements
|
|
phoneBo.setTenantId(bo.getTenantId());
|
|
phoneBo.setTenantId(bo.getTenantId());
|
|
log.info(String.format("旧系统获取商品学习中心路径:%s(url),%s(tenantId)",url,bo.getTenantId()));
|
|
log.info(String.format("旧系统获取商品学习中心路径:%s(url),%s(tenantId)",url,bo.getTenantId()));
|
|
//缓存用户手机号码 30分钟失效
|
|
//缓存用户手机号码 30分钟失效
|
|
- redisCache.setCacheObjectTenant(nowTime.toString(), JSONObject.toJSONString(phoneBo), 30, TimeUnit.MINUTES);
|
|
|
|
|
|
+ redisCache.setCacheObjectTenant(bo.getTenantId()+":"+nowTime.toString(), JSONObject.toJSONString(phoneBo), 30, TimeUnit.MINUTES);
|
|
return url;
|
|
return url;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -2454,7 +2460,7 @@ public class GoodsServiceImpl extends ServiceImpl<GoodsMapper, Goods> implements
|
|
copyRecordList.add(record);
|
|
copyRecordList.add(record);
|
|
});
|
|
});
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
//9 业务层次
|
|
//9 业务层次
|
|
List<CourseBusiness> businessList = iCourseBusinessService.list();
|
|
List<CourseBusiness> businessList = iCourseBusinessService.list();
|
|
if (CollectionUtils.isNotEmpty(businessList)){
|
|
if (CollectionUtils.isNotEmpty(businessList)){
|
|
@@ -2515,7 +2521,7 @@ public class GoodsServiceImpl extends ServiceImpl<GoodsMapper, Goods> implements
|
|
//关联表不需要记录(后续修改ID)
|
|
//关联表不需要记录(后续修改ID)
|
|
iCourseChapterBusinessService.saveBatch(newChapterBusinesseList);
|
|
iCourseChapterBusinessService.saveBatch(newChapterBusinesseList);
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
//12 课程章节关联
|
|
//12 课程章节关联
|
|
List<CourseChapterSection> chapterSectionList = iCourseChapterSectionService.list();
|
|
List<CourseChapterSection> chapterSectionList = iCourseChapterSectionService.list();
|
|
if (CollectionUtils.isNotEmpty(chapterSectionList)){
|
|
if (CollectionUtils.isNotEmpty(chapterSectionList)){
|
|
@@ -2528,7 +2534,7 @@ public class GoodsServiceImpl extends ServiceImpl<GoodsMapper, Goods> implements
|
|
//关联表不需要记录(后续修改ID)
|
|
//关联表不需要记录(后续修改ID)
|
|
iCourseChapterSectionService.saveBatch(newChapterSectionList);
|
|
iCourseChapterSectionService.saveBatch(newChapterSectionList);
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
//13 教育类型关联
|
|
//13 教育类型关联
|
|
List<CourseEducationTier> educationTiers = iCourseEducationTierService.list();
|
|
List<CourseEducationTier> educationTiers = iCourseEducationTierService.list();
|
|
if (CollectionUtils.isNotEmpty(educationTiers)){
|
|
if (CollectionUtils.isNotEmpty(educationTiers)){
|
|
@@ -2652,7 +2658,7 @@ public class GoodsServiceImpl extends ServiceImpl<GoodsMapper, Goods> implements
|
|
copyRecordList.add(record);
|
|
copyRecordList.add(record);
|
|
});
|
|
});
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
//20 课程模块业务关联
|
|
//20 课程模块业务关联
|
|
List<CourseModuleBusiness> moduleBusinessList = iCourseModuleBusinessService.list();
|
|
List<CourseModuleBusiness> moduleBusinessList = iCourseModuleBusinessService.list();
|
|
if (CollectionUtils.isNotEmpty(moduleBusinessList)){
|
|
if (CollectionUtils.isNotEmpty(moduleBusinessList)){
|
|
@@ -2739,7 +2745,7 @@ public class GoodsServiceImpl extends ServiceImpl<GoodsMapper, Goods> implements
|
|
//关联表不需要记录(后续修改ID)
|
|
//关联表不需要记录(后续修改ID)
|
|
iCourseSectionBusinessService.saveBatch(newSectionBusinessList);
|
|
iCourseSectionBusinessService.saveBatch(newSectionBusinessList);
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
//25 课程节观看权限关联
|
|
//25 课程节观看权限关联
|
|
List<CourseSectionWatchPer> sectionWatchPerList = iCourseSectionWatchPerService.list();
|
|
List<CourseSectionWatchPer> sectionWatchPerList = iCourseSectionWatchPerService.list();
|
|
if (CollectionUtils.isNotEmpty(sectionWatchPerList)){
|
|
if (CollectionUtils.isNotEmpty(sectionWatchPerList)){
|
|
@@ -2887,7 +2893,7 @@ public class GoodsServiceImpl extends ServiceImpl<GoodsMapper, Goods> implements
|
|
//关联表不需要记录(后续修改ID)
|
|
//关联表不需要记录(后续修改ID)
|
|
iMajorProjectService.saveBatch(newMajorProjectList);
|
|
iMajorProjectService.saveBatch(newMajorProjectList);
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
//33 服务
|
|
//33 服务
|
|
List<PayServe> serveList = iPayServeService.list();
|
|
List<PayServe> serveList = iPayServeService.list();
|
|
if (CollectionUtils.isNotEmpty(serveList)){
|
|
if (CollectionUtils.isNotEmpty(serveList)){
|
|
@@ -3068,7 +3074,7 @@ public class GoodsServiceImpl extends ServiceImpl<GoodsMapper, Goods> implements
|
|
copyRecordList.add(record);
|
|
copyRecordList.add(record);
|
|
});
|
|
});
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
//41 资料模板业务层次关联
|
|
//41 资料模板业务层次关联
|
|
List<ProfileTpBusiness> tpBusinessList = iProfileTpBusinessService.list();
|
|
List<ProfileTpBusiness> tpBusinessList = iProfileTpBusinessService.list();
|
|
if (CollectionUtils.isNotEmpty(tpBusinessList)){
|
|
if (CollectionUtils.isNotEmpty(tpBusinessList)){
|
|
@@ -3155,7 +3161,7 @@ public class GoodsServiceImpl extends ServiceImpl<GoodsMapper, Goods> implements
|
|
//关联表不需要记录(后续修改ID)
|
|
//关联表不需要记录(后续修改ID)
|
|
iQuestionChapterExamService.saveBatch(newQuestionChapterExamList);
|
|
iQuestionChapterExamService.saveBatch(newQuestionChapterExamList);
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
//46 题库模块
|
|
//46 题库模块
|
|
List<QuestionModule> questionModuleList = iQuestionModuleService.list();
|
|
List<QuestionModule> questionModuleList = iQuestionModuleService.list();
|
|
if (CollectionUtils.isNotEmpty(questionModuleList)){
|
|
if (CollectionUtils.isNotEmpty(questionModuleList)){
|