|
|
@@ -6231,6 +6231,30 @@ public class GoodsServiceImpl extends ServiceImpl<GoodsMapper, Goods> implements
|
|
|
return ObjectUtils.isNotNull(courseSubject)?BeanUtil.toBean(courseSubject,SubjectMarketingVo.class):null;
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public boolean updateQdyUrl(List<SectionImportBo> boList, String goodsId) {
|
|
|
+ //获取商品节信息
|
|
|
+ List<CourseSection> sections = baseMapper.getGoodsDaySectionInfo(Long.valueOf(goodsId));
|
|
|
+ if (CollectionUtils.isEmpty(sections)){
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ sections.forEach(x -> {
|
|
|
+ if (ObjectUtils.isNull(x.getName())){
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ SectionImportBo bo = boList.stream().filter(k -> k.getSectionName().equals(x.getName())).findFirst().orElse(null);
|
|
|
+ if (ObjectUtils.isNull(bo)){
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ x.setPaolivayVideoUrl(x.getRecordingUrl());
|
|
|
+ x.setPaolivayVideoTime(x.getDurationTime());
|
|
|
+ x.setTencentVideoUrl(bo.getSectionUrl());
|
|
|
+ x.setTencentVideoTime(Long.valueOf(bo.getSectionTime()));
|
|
|
+ });
|
|
|
+
|
|
|
+ return iCourseSectionService.updateBatchById(sections);
|
|
|
+ }
|
|
|
+
|
|
|
private Long businessCheck(String name,Long projectId){
|
|
|
CourseProjectType projectType = iCourseProjectTypeService.getById(projectId);
|
|
|
CourseBusiness business = iCourseBusinessService
|