|
@@ -882,7 +882,8 @@ public class GoodsServiceImpl extends ServiceImpl<GoodsMapper, Goods> implements
|
|
|
subjectStudyRecordQueryBo.setUserId(user.getUserId());
|
|
|
subjectStudyRecordQueryBo.setOrderGoodsId(goodsVo.getOrderGoodsId());
|
|
|
subjectStudyRecordQueryBo.setGradeId(goodsVo.getGradeId());
|
|
|
- List<SubjectStudyRecordVo> subjectStudyRecordVos = iUserStudyRecordService.listSubject(subjectStudyRecordQueryBo);
|
|
|
+ subjectStudyRecordQueryBo.setTenantId(goodsVo.getTrainOrgId());
|
|
|
+ List<SubjectStudyRecordVo> subjectStudyRecordVos = iUserStudyRecordService.listSubjectTenant(subjectStudyRecordQueryBo);
|
|
|
for (SubjectStudyRecordVo subjectStudyRecordVo : subjectStudyRecordVos) {
|
|
|
secLong = new BigDecimal(secLong.toString()).add(new BigDecimal(subjectStudyRecordVo.getSectionNum().toString())).longValue();
|
|
|
studyLong = new BigDecimal(studyLong.toString()).add(new BigDecimal(subjectStudyRecordVo.getRecordNum().toString())).longValue();
|
|
@@ -894,7 +895,7 @@ public class GoodsServiceImpl extends ServiceImpl<GoodsMapper, Goods> implements
|
|
|
if (goodsVo.getCourseType() == 1) {
|
|
|
//视频商品
|
|
|
//获得当前所在班级
|
|
|
- ClassGradeVo classGradeVo = courseMapper.gradeIdSelect(user.getUserId(), goodsVo.getGoodsId(), goodsVo.getGradeId());
|
|
|
+ ClassGradeVo classGradeVo = courseMapper.gradeIdSelectTenant(user.getUserId(), goodsVo.getGoodsId(), goodsVo.getGradeId(),goodsVo.getTrainOrgId());
|
|
|
if (ObjectUtils.isNotNull(classGradeVo)) {
|
|
|
goodsVo.setPeriodStatus(classGradeVo.getPeriodStatus());
|
|
|
}
|
|
@@ -918,17 +919,25 @@ public class GoodsServiceImpl extends ServiceImpl<GoodsMapper, Goods> implements
|
|
|
if (ObjectUtils.isNull(sysConfig)){
|
|
|
throw new CustomException("获取小程序appId失败");
|
|
|
}
|
|
|
+ //课程
|
|
|
+ List<Long> courseIds = iGoodsCourseService.getCourseIdsByGoodsAndTenant(goodsVo.getGoodsId(),goodsVo.getTrainOrgId());
|
|
|
+ if (CollectionUtils.isNotEmpty(courseIds) && courseIds.size() == 1){
|
|
|
+ goodsVo.setCourseId(courseIds.get(0));
|
|
|
+ }
|
|
|
goodsVo.setWeAppId(sysConfig.getConfigValue());
|
|
|
if (goodsVo.getCourseType() == 2){
|
|
|
//题库
|
|
|
goodsVo.setToWeAppPagePath("/pages/questionBank/index");
|
|
|
}else if (goodsVo.getCourseType() == 6){
|
|
|
//直播
|
|
|
- goodsVo.setToWeAppPagePath("/pages3/live/detail");
|
|
|
+ goodsVo.setToWeAppPagePath(String.format("/pages3/live/detail?orderGoodsId=%s&goodsId=%s&gradeId=0&courseId=%s",
|
|
|
+ goodsVo.getOrderGoodsId(),goodsVo.getGoodsId(),goodsVo.getCourseId()));
|
|
|
}else {
|
|
|
//视频
|
|
|
- goodsVo.setToWeAppPagePath("/pages3/polyv/detail");
|
|
|
+ goodsVo.setToWeAppPagePath(String.format("/pages3/polyv/detail?id=%s&goodsId=%s&orderGoodsId=%s&gradeId=%s",
|
|
|
+ goodsVo.getCourseId(),goodsVo.getGoodsId(),goodsVo.getOrderGoodsId(),goodsVo.getGradeId()));
|
|
|
}
|
|
|
+
|
|
|
});
|
|
|
|
|
|
return voList;
|