91d4561d by chentao

no message

1 parent 13a25c60
......@@ -11,7 +11,6 @@ import com.lego.common.core.service.OssService;
import com.lego.common.utils.MessageUtils;
import com.lego.common.utils.StreamUtils;
import com.lego.core.annotation.LanguageAnnotation;
import com.lego.core.domin.Advert;
import com.lego.core.domin.Course;
import com.lego.core.domin.bo.CourseBo;
import com.lego.core.domin.bo.CourseQueryBo;
......@@ -28,7 +27,6 @@ import org.springframework.stereotype.Service;
import java.rmi.ServerException;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Set;
/**
......@@ -64,23 +62,19 @@ public class CourseServiceImpl implements ICourseService {
for (CourseVo vo : list) {
vo.setBuildingBlockName(blockMap.getOrDefault(vo.getBuildingBlockId(), new BuildingBlockVo()).getName());
if(StrUtil.isNotBlank(vo.getTwoDimensionalOssId())){
SysOssVo oss = iSysOssService.getById(Long.valueOf(vo.getTwoDimensionalOssId()));
vo.setTwoDimensionalOssUrl(oss.getUrl());
vo.setTwoDimensionalOssUrl(ossUrlService.selectUrlByIds(vo.getTwoDimensionalOssId()));
}
if(StrUtil.isNotBlank(vo.getThreeDimensionalOssId())){
SysOssVo oss = iSysOssService.getById(Long.valueOf(vo.getThreeDimensionalOssId()));
vo.setThreeDimensionalOssUrl(oss.getUrl());
vo.setThreeDimensionalOssUrl(ossUrlService.selectUrlByIds(vo.getThreeDimensionalOssId()));
}
if(StrUtil.isNotBlank(vo.getCaseOssId())){
SysOssVo oss = iSysOssService.getById(Long.valueOf(vo.getCaseOssId()));
vo.setCaseOssUrl(oss.getUrl());
vo.setCaseOssUrl(ossUrlService.selectUrlByIds(vo.getCaseOssId()));
}
if(StrUtil.isNotBlank(vo.getTeachingOssId())){
vo.setTeachingOssUrl(ossUrlService.selectUrlByIds(vo.getTeachingOssId()));
}
if(StrUtil.isNotBlank(vo.getPptOssId())){
SysOssVo oss = iSysOssService.getById(Long.valueOf(vo.getPptOssId()));
vo.setPptOssUrl(oss.getUrl());
vo.setPptOssUrl(ossUrlService.selectUrlByIds(vo.getPptOssId()));
}
}
}
......@@ -97,31 +91,19 @@ public class CourseServiceImpl implements ICourseService {
List<CourseVo> list = baseMapper.selectVoList(Wrappers.<Course>lambdaQuery().eq(Course::getBuildingBlockId, buildingBlockId).orderByAsc(Course::getSort));
for (CourseVo vo : list) {
if(StrUtil.isNotBlank(vo.getTwoDimensionalOssId())){
SysOssVo oss = iSysOssService.getById(Long.valueOf(vo.getTwoDimensionalOssId()));
if(Objects.nonNull(oss)) {
vo.setTwoDimensionalOssUrl(oss.getUrl());
}
vo.setTwoDimensionalOssUrl(ossUrlService.selectUrlByIds(vo.getTwoDimensionalOssId()));
}
if(StrUtil.isNotBlank(vo.getThreeDimensionalOssId())){
SysOssVo oss = iSysOssService.getById(Long.valueOf(vo.getThreeDimensionalOssId()));
if(Objects.nonNull(oss)) {
vo.setThreeDimensionalOssUrl(oss.getUrl());
}
vo.setThreeDimensionalOssUrl(ossUrlService.selectUrlByIds(vo.getThreeDimensionalOssId()));
}
if(StrUtil.isNotBlank(vo.getCaseOssId())){
SysOssVo oss = iSysOssService.getById(Long.valueOf(vo.getCaseOssId()));
if(Objects.nonNull(oss)) {
vo.setCaseOssUrl(oss.getUrl());
}
vo.setCaseOssUrl(ossUrlService.selectUrlByIds(vo.getCaseOssId()));
}
if(StrUtil.isNotBlank(vo.getTeachingOssId())){
vo.setTeachingOssUrl(ossUrlService.selectUrlByIds(vo.getTeachingOssId()));
}
if(StrUtil.isNotBlank(vo.getPptOssId())){
SysOssVo oss = iSysOssService.getById(Long.valueOf(vo.getPptOssId()));
if(Objects.nonNull(oss)) {
vo.setPptOssUrl(oss.getUrl());
}
vo.setPptOssUrl(ossUrlService.selectUrlByIds(vo.getPptOssId()));
}
}
return list;
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!