增加绝对OSSURL
Showing
10 changed files
with
113 additions
and
7 deletions
| ... | @@ -40,6 +40,11 @@ public class BuildingBlockVo { | ... | @@ -40,6 +40,11 @@ public class BuildingBlockVo { |
| 40 | private String ossId; | 40 | private String ossId; |
| 41 | 41 | ||
| 42 | /** | 42 | /** |
| 43 | * 图片URL | ||
| 44 | */ | ||
| 45 | private String ossUrl; | ||
| 46 | |||
| 47 | /** | ||
| 43 | * 前端APP数据国际化(zh_CN、en_US、ru_RU) | 48 | * 前端APP数据国际化(zh_CN、en_US、ru_RU) |
| 44 | */ | 49 | */ |
| 45 | private String language; | 50 | private String language; | ... | ... |
| ... | @@ -49,6 +49,11 @@ public class CourseVo { | ... | @@ -49,6 +49,11 @@ public class CourseVo { |
| 49 | private String twoDimensionalUrl; | 49 | private String twoDimensionalUrl; |
| 50 | 50 | ||
| 51 | /** | 51 | /** |
| 52 | * 2D oss URL | ||
| 53 | */ | ||
| 54 | private String twoDimensionalOssUrl; | ||
| 55 | |||
| 56 | /** | ||
| 52 | * 2D oss_id | 57 | * 2D oss_id |
| 53 | */ | 58 | */ |
| 54 | private String twoDimensionalOssId; | 59 | private String twoDimensionalOssId; |
| ... | @@ -69,6 +74,11 @@ public class CourseVo { | ... | @@ -69,6 +74,11 @@ public class CourseVo { |
| 69 | private String threeDimensionalOssId; | 74 | private String threeDimensionalOssId; |
| 70 | 75 | ||
| 71 | /** | 76 | /** |
| 77 | * 3D oss_URL | ||
| 78 | */ | ||
| 79 | private String threeDimensionalOssUrl; | ||
| 80 | |||
| 81 | /** | ||
| 72 | * 案例OSS_id | 82 | * 案例OSS_id |
| 73 | */ | 83 | */ |
| 74 | private String caseOssId; | 84 | private String caseOssId; | ... | ... |
| ... | @@ -42,6 +42,11 @@ public class EntiretyVo { | ... | @@ -42,6 +42,11 @@ public class EntiretyVo { |
| 42 | private String ossId; | 42 | private String ossId; |
| 43 | 43 | ||
| 44 | /** | 44 | /** |
| 45 | * 文件URL | ||
| 46 | */ | ||
| 47 | private String ossUrl; | ||
| 48 | |||
| 49 | /** | ||
| 45 | * 前端APP数据国际化(zh_CN、en_US、ru_RU) | 50 | * 前端APP数据国际化(zh_CN、en_US、ru_RU) |
| 46 | */ | 51 | */ |
| 47 | private String language; | 52 | private String language; | ... | ... |
| ... | @@ -30,11 +30,21 @@ public class QuestionVo { | ... | @@ -30,11 +30,21 @@ public class QuestionVo { |
| 30 | private String coverOssId; | 30 | private String coverOssId; |
| 31 | 31 | ||
| 32 | /** | 32 | /** |
| 33 | * 封面URl | ||
| 34 | */ | ||
| 35 | private String coverOssUrl; | ||
| 36 | |||
| 37 | /** | ||
| 33 | * 视频 ossId | 38 | * 视频 ossId |
| 34 | */ | 39 | */ |
| 35 | private String videoOssId; | 40 | private String videoOssId; |
| 36 | 41 | ||
| 37 | /** | 42 | /** |
| 43 | * 视频URL | ||
| 44 | */ | ||
| 45 | private String videoOssUrl; | ||
| 46 | |||
| 47 | /** | ||
| 38 | * Android展示状态 0 不展示 1展示 | 48 | * Android展示状态 0 不展示 1展示 |
| 39 | */ | 49 | */ |
| 40 | private String showAndroid; | 50 | private String showAndroid; | ... | ... |
| ... | @@ -28,6 +28,11 @@ public class UpgradeVo { | ... | @@ -28,6 +28,11 @@ public class UpgradeVo { |
| 28 | private String fileOssId; | 28 | private String fileOssId; |
| 29 | 29 | ||
| 30 | /** | 30 | /** |
| 31 | * 文件地址 | ||
| 32 | */ | ||
| 33 | private String ossUrl; | ||
| 34 | |||
| 35 | /** | ||
| 31 | * 升级包类型 Android IOS windows | 36 | * 升级包类型 Android IOS windows |
| 32 | */ | 37 | */ |
| 33 | private String platformType; | 38 | private String platformType; | ... | ... |
| ... | @@ -6,6 +6,7 @@ import cn.hutool.core.util.StrUtil; | ... | @@ -6,6 +6,7 @@ import cn.hutool.core.util.StrUtil; |
| 6 | import com.baomidou.mybatisplus.core.toolkit.Wrappers; | 6 | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| 7 | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | 7 | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| 8 | import com.lego.common.core.page.TableDataInfo; | 8 | import com.lego.common.core.page.TableDataInfo; |
| 9 | import com.lego.common.core.service.OssService; | ||
| 9 | import com.lego.common.utils.MessageUtils; | 10 | import com.lego.common.utils.MessageUtils; |
| 10 | import com.lego.common.utils.StreamUtils; | 11 | import com.lego.common.utils.StreamUtils; |
| 11 | import com.lego.core.annotation.LanguageAnnotation; | 12 | import com.lego.core.annotation.LanguageAnnotation; |
| ... | @@ -37,6 +38,7 @@ import java.util.Set; | ... | @@ -37,6 +38,7 @@ import java.util.Set; |
| 37 | public class BuildingBlockServiceImpl implements IBuildingBlockService { | 38 | public class BuildingBlockServiceImpl implements IBuildingBlockService { |
| 38 | private final BuildingBlockMapper baseMapper; | 39 | private final BuildingBlockMapper baseMapper; |
| 39 | private final IEntiretyService entiretyService; | 40 | private final IEntiretyService entiretyService; |
| 41 | private final OssService ossService; | ||
| 40 | 42 | ||
| 41 | /** | 43 | /** |
| 42 | * 查询所有列表(带分页) | 44 | * 查询所有列表(带分页) |
| ... | @@ -49,18 +51,25 @@ public class BuildingBlockServiceImpl implements IBuildingBlockService { | ... | @@ -49,18 +51,25 @@ public class BuildingBlockServiceImpl implements IBuildingBlockService { |
| 49 | Page<BuildingBlockVo> page = baseMapper.selectVoPage(queryBo.build(), Wrappers.<BuildingBlock>lambdaQuery() | 51 | Page<BuildingBlockVo> page = baseMapper.selectVoPage(queryBo.build(), Wrappers.<BuildingBlock>lambdaQuery() |
| 50 | .eq(StrUtil.isNotBlank(queryBo.getSearchKey()), BuildingBlock::getName, queryBo.getSearchKey()) | 52 | .eq(StrUtil.isNotBlank(queryBo.getSearchKey()), BuildingBlock::getName, queryBo.getSearchKey()) |
| 51 | .eq(BuildingBlock::getLanguage, language)); | 53 | .eq(BuildingBlock::getLanguage, language)); |
| 52 | List<BuildingBlockVo> list = page.getRecords(); | 54 | setInfo(page.getRecords()); |
| 55 | return TableDataInfo.build(page); | ||
| 56 | } | ||
| 57 | |||
| 58 | private void setInfo(List<BuildingBlockVo> list) { | ||
| 53 | if (ObjectUtil.isNotEmpty(list)) { | 59 | if (ObjectUtil.isNotEmpty(list)) { |
| 54 | Set<String> ids = StreamUtils.toSet(list, BuildingBlockVo::getEntiretyId); | 60 | Set<String> ids = StreamUtils.toSet(list, BuildingBlockVo::getEntiretyId); |
| 55 | List<EntiretyVo> entiretyList = entiretyService.getListByIds(ids); | 61 | List<EntiretyVo> entiretyList = entiretyService.getListByIds(ids); |
| 56 | Map<String, EntiretyVo> entiretyMap = StreamUtils.toMap(entiretyList, EntiretyVo::getId, v -> v); | 62 | Map<String, EntiretyVo> entiretyMap = StreamUtils.toMap(entiretyList, EntiretyVo::getId, v -> v); |
| 57 | for (BuildingBlockVo vo : list) { | 63 | for (BuildingBlockVo vo : list) { |
| 58 | vo.setEntiretyName(entiretyMap.getOrDefault(vo.getEntiretyId(), new EntiretyVo()).getName()); | 64 | vo.setEntiretyName(entiretyMap.getOrDefault(vo.getEntiretyId(), new EntiretyVo()).getName()); |
| 65 | if (StrUtil.isNotBlank(vo.getOssId())) { | ||
| 66 | vo.setOssUrl(ossService.selectUrlByIds(vo.getOssId())); | ||
| 67 | } | ||
| 59 | } | 68 | } |
| 60 | } | 69 | } |
| 61 | return TableDataInfo.build(page); | ||
| 62 | } | 70 | } |
| 63 | 71 | ||
| 72 | |||
| 64 | /** | 73 | /** |
| 65 | * 不带分页查询 | 74 | * 不带分页查询 |
| 66 | * | 75 | * |
| ... | @@ -68,18 +77,23 @@ public class BuildingBlockServiceImpl implements IBuildingBlockService { | ... | @@ -68,18 +77,23 @@ public class BuildingBlockServiceImpl implements IBuildingBlockService { |
| 68 | */ | 77 | */ |
| 69 | @Override | 78 | @Override |
| 70 | public List<BuildingBlockVo> list(String language) { | 79 | public List<BuildingBlockVo> list(String language) { |
| 71 | return baseMapper.selectVoList(Wrappers.<BuildingBlock>lambdaQuery().eq(BuildingBlock::getLanguage, language)); | 80 | List<BuildingBlockVo> list = baseMapper.selectVoList(Wrappers.<BuildingBlock>lambdaQuery().eq(BuildingBlock::getLanguage, language)); |
| 81 | setInfo(list); | ||
| 82 | return list; | ||
| 72 | } | 83 | } |
| 73 | 84 | ||
| 74 | /** | 85 | /** |
| 75 | * (根据套件ID)不带分页查询 | 86 | * (根据套件ID)不带分页查询 |
| 87 | * | ||
| 76 | * @param language | 88 | * @param language |
| 77 | * @param entiretyIds | 89 | * @param entiretyIds |
| 78 | * @return | 90 | * @return |
| 79 | */ | 91 | */ |
| 80 | @Override | 92 | @Override |
| 81 | public List<BuildingBlockVo> list(String language, Collection<String> entiretyIds) { | 93 | public List<BuildingBlockVo> list(String language, Collection<String> entiretyIds) { |
| 82 | return baseMapper.selectVoList(Wrappers.<BuildingBlock>lambdaQuery().eq(BuildingBlock::getLanguage, language).in(BuildingBlock::getEntiretyId,entiretyIds)); | 94 | List<BuildingBlockVo> list = baseMapper.selectVoList(Wrappers.<BuildingBlock>lambdaQuery().eq(BuildingBlock::getLanguage, language).in(BuildingBlock::getEntiretyId, entiretyIds)); |
| 95 | setInfo(list); | ||
| 96 | return list; | ||
| 83 | } | 97 | } |
| 84 | 98 | ||
| 85 | /** | 99 | /** |
| ... | @@ -131,7 +145,9 @@ public class BuildingBlockServiceImpl implements IBuildingBlockService { | ... | @@ -131,7 +145,9 @@ public class BuildingBlockServiceImpl implements IBuildingBlockService { |
| 131 | */ | 145 | */ |
| 132 | @Override | 146 | @Override |
| 133 | public List<BuildingBlockVo> getListByIds(Collection<String> ids) { | 147 | public List<BuildingBlockVo> getListByIds(Collection<String> ids) { |
| 134 | return baseMapper.selectVoList(Wrappers.<BuildingBlock>lambdaQuery().in(BuildingBlock::getId, ids)); | 148 | List<BuildingBlockVo> list = baseMapper.selectVoList(Wrappers.<BuildingBlock>lambdaQuery().in(BuildingBlock::getId, ids)); |
| 149 | setInfo(list); | ||
| 150 | return list; | ||
| 135 | } | 151 | } |
| 136 | 152 | ||
| 137 | @Override | 153 | @Override | ... | ... |
| ... | @@ -6,6 +6,7 @@ import cn.hutool.core.util.StrUtil; | ... | @@ -6,6 +6,7 @@ import cn.hutool.core.util.StrUtil; |
| 6 | import com.baomidou.mybatisplus.core.toolkit.Wrappers; | 6 | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| 7 | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | 7 | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| 8 | import com.lego.common.core.page.TableDataInfo; | 8 | import com.lego.common.core.page.TableDataInfo; |
| 9 | import com.lego.common.core.service.OssService; | ||
| 9 | import com.lego.common.utils.MessageUtils; | 10 | import com.lego.common.utils.MessageUtils; |
| 10 | import com.lego.common.utils.StreamUtils; | 11 | import com.lego.common.utils.StreamUtils; |
| 11 | import com.lego.core.annotation.LanguageAnnotation; | 12 | import com.lego.core.annotation.LanguageAnnotation; |
| ... | @@ -39,6 +40,7 @@ public class CourseServiceImpl implements ICourseService { | ... | @@ -39,6 +40,7 @@ public class CourseServiceImpl implements ICourseService { |
| 39 | private final CourseMapper baseMapper; | 40 | private final CourseMapper baseMapper; |
| 40 | private final IBuildingBlockService buildingBlockService; | 41 | private final IBuildingBlockService buildingBlockService; |
| 41 | private final ISysOssService ossService; | 42 | private final ISysOssService ossService; |
| 43 | private final OssService ossUrlService; | ||
| 42 | 44 | ||
| 43 | /** | 45 | /** |
| 44 | * 查询所有列表 | 46 | * 查询所有列表 |
| ... | @@ -58,6 +60,12 @@ public class CourseServiceImpl implements ICourseService { | ... | @@ -58,6 +60,12 @@ public class CourseServiceImpl implements ICourseService { |
| 58 | Map<String, BuildingBlockVo> blockMap = StreamUtils.toMap(blockList, BuildingBlockVo::getId, v -> v); | 60 | Map<String, BuildingBlockVo> blockMap = StreamUtils.toMap(blockList, BuildingBlockVo::getId, v -> v); |
| 59 | for (CourseVo vo : list) { | 61 | for (CourseVo vo : list) { |
| 60 | vo.setBuildingBlockName(blockMap.getOrDefault(vo.getBuildingBlockId(), new BuildingBlockVo()).getName()); | 62 | vo.setBuildingBlockName(blockMap.getOrDefault(vo.getBuildingBlockId(), new BuildingBlockVo()).getName()); |
| 63 | if(StrUtil.isNotBlank(vo.getTwoDimensionalOssId())){ | ||
| 64 | vo.setTwoDimensionalOssUrl(ossUrlService.selectUrlByIds(vo.getTwoDimensionalOssId())); | ||
| 65 | } | ||
| 66 | if(StrUtil.isNotBlank(vo.getThreeDimensionalOssId())){ | ||
| 67 | vo.setThreeDimensionalOssUrl(ossUrlService.selectUrlByIds(vo.getThreeDimensionalOssId())); | ||
| 68 | } | ||
| 61 | } | 69 | } |
| 62 | } | 70 | } |
| 63 | return TableDataInfo.build(page); | 71 | return TableDataInfo.build(page); |
| ... | @@ -70,7 +78,16 @@ public class CourseServiceImpl implements ICourseService { | ... | @@ -70,7 +78,16 @@ public class CourseServiceImpl implements ICourseService { |
| 70 | */ | 78 | */ |
| 71 | @Override | 79 | @Override |
| 72 | public List<CourseVo> list(String buildingBlockId) { | 80 | public List<CourseVo> list(String buildingBlockId) { |
| 73 | return baseMapper.selectVoList(Wrappers.<Course>lambdaQuery().eq(Course::getBuildingBlockId, buildingBlockId)); | 81 | List<CourseVo> list = baseMapper.selectVoList(Wrappers.<Course>lambdaQuery().eq(Course::getBuildingBlockId, buildingBlockId)); |
| 82 | for (CourseVo vo : list) { | ||
| 83 | if(StrUtil.isNotBlank(vo.getTwoDimensionalOssId())){ | ||
| 84 | vo.setTwoDimensionalOssUrl(ossUrlService.selectUrlByIds(vo.getTwoDimensionalOssId())); | ||
| 85 | } | ||
| 86 | if(StrUtil.isNotBlank(vo.getThreeDimensionalOssId())){ | ||
| 87 | vo.setThreeDimensionalOssUrl(ossUrlService.selectUrlByIds(vo.getThreeDimensionalOssId())); | ||
| 88 | } | ||
| 89 | } | ||
| 90 | return list; | ||
| 74 | } | 91 | } |
| 75 | 92 | ||
| 76 | /** | 93 | /** | ... | ... |
| ... | @@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers; | ... | @@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| 6 | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | 6 | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| 7 | import com.lego.common.core.domain.PageQuery; | 7 | import com.lego.common.core.domain.PageQuery; |
| 8 | import com.lego.common.core.page.TableDataInfo; | 8 | import com.lego.common.core.page.TableDataInfo; |
| 9 | import com.lego.common.core.service.OssService; | ||
| 9 | import com.lego.common.utils.MessageUtils; | 10 | import com.lego.common.utils.MessageUtils; |
| 10 | import com.lego.common.utils.StreamUtils; | 11 | import com.lego.common.utils.StreamUtils; |
| 11 | import com.lego.core.annotation.LanguageAnnotation; | 12 | import com.lego.core.annotation.LanguageAnnotation; |
| ... | @@ -32,6 +33,7 @@ import java.util.*; | ... | @@ -32,6 +33,7 @@ import java.util.*; |
| 32 | @Service | 33 | @Service |
| 33 | public class EntiretyServiceImpl implements IEntiretyService { | 34 | public class EntiretyServiceImpl implements IEntiretyService { |
| 34 | private final EntiretyMapper baseMapper; | 35 | private final EntiretyMapper baseMapper; |
| 36 | private final OssService ossService; | ||
| 35 | private final IBuildingBlockService buildingBlockService; | 37 | private final IBuildingBlockService buildingBlockService; |
| 36 | 38 | ||
| 37 | /** | 39 | /** |
| ... | @@ -50,8 +52,14 @@ public class EntiretyServiceImpl implements IEntiretyService { | ... | @@ -50,8 +52,14 @@ public class EntiretyServiceImpl implements IEntiretyService { |
| 50 | List<EntiretyVo> list = page.getRecords(); | 52 | List<EntiretyVo> list = page.getRecords(); |
| 51 | Set<String> BuildingBlockIdList = StreamUtils.toSet(list,EntiretyVo::getId); | 53 | Set<String> BuildingBlockIdList = StreamUtils.toSet(list,EntiretyVo::getId); |
| 52 | List<BuildingBlockVo> BuildingBlockList = buildingBlockService.list(language, BuildingBlockIdList); | 54 | List<BuildingBlockVo> BuildingBlockList = buildingBlockService.list(language, BuildingBlockIdList); |
| 55 | for(BuildingBlockVo vo : BuildingBlockList){ | ||
| 56 | if(StrUtil.isNotBlank(vo.getOssId())) { | ||
| 57 | vo.setOssUrl(ossService.selectUrlByIds(vo.getOssId())); | ||
| 58 | } | ||
| 59 | } | ||
| 53 | Map<String,List<BuildingBlockVo>> buildingBlockMap = StreamUtils.groupByKey(BuildingBlockList,BuildingBlockVo::getEntiretyId); | 60 | Map<String,List<BuildingBlockVo>> buildingBlockMap = StreamUtils.groupByKey(BuildingBlockList,BuildingBlockVo::getEntiretyId); |
| 54 | for(EntiretyVo vo:list){ | 61 | for(EntiretyVo vo:list){ |
| 62 | vo.setOssUrl(ossService.selectUrlByIds(vo.getOssId())); | ||
| 55 | vo.setBuildingblockList(buildingBlockMap.get(vo.getId())); | 63 | vo.setBuildingblockList(buildingBlockMap.get(vo.getId())); |
| 56 | } | 64 | } |
| 57 | return TableDataInfo.build(page); | 65 | return TableDataInfo.build(page); |
| ... | @@ -64,7 +72,20 @@ public class EntiretyServiceImpl implements IEntiretyService { | ... | @@ -64,7 +72,20 @@ public class EntiretyServiceImpl implements IEntiretyService { |
| 64 | */ | 72 | */ |
| 65 | @Override | 73 | @Override |
| 66 | public List<EntiretyVo> list(String language) { | 74 | public List<EntiretyVo> list(String language) { |
| 67 | return baseMapper.selectVoList(Wrappers.<Entirety>lambdaQuery().eq(Entirety::getLanguage, language).orderByAsc(Entirety::getSort)); | 75 | List<EntiretyVo> list = baseMapper.selectVoList(Wrappers.<Entirety>lambdaQuery().eq(Entirety::getLanguage, language).orderByAsc(Entirety::getSort)); |
| 76 | for(EntiretyVo vo:list){ | ||
| 77 | if(StrUtil.isNotBlank(vo.getOssId())){ | ||
| 78 | vo.setOssUrl(ossService.selectUrlByIds(vo.getOssId())); | ||
| 79 | } | ||
| 80 | List<BuildingBlockVo> buildingBlockVoList = vo.getBuildingblockList(); | ||
| 81 | for(BuildingBlockVo blockVo:buildingBlockVoList){ | ||
| 82 | if(StrUtil.isNotBlank(blockVo.getOssId())){ | ||
| 83 | blockVo.setOssUrl(ossService.selectUrlByIds(blockVo.getOssId())); | ||
| 84 | } | ||
| 85 | } | ||
| 86 | } | ||
| 87 | |||
| 88 | return list; | ||
| 68 | } | 89 | } |
| 69 | 90 | ||
| 70 | /** | 91 | /** | ... | ... |
| ... | @@ -5,6 +5,7 @@ import cn.hutool.core.util.StrUtil; | ... | @@ -5,6 +5,7 @@ import cn.hutool.core.util.StrUtil; |
| 5 | import com.baomidou.mybatisplus.core.toolkit.Wrappers; | 5 | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| 6 | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | 6 | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| 7 | import com.lego.common.core.page.TableDataInfo; | 7 | import com.lego.common.core.page.TableDataInfo; |
| 8 | import com.lego.common.core.service.OssService; | ||
| 8 | import com.lego.common.utils.MessageUtils; | 9 | import com.lego.common.utils.MessageUtils; |
| 9 | import com.lego.core.annotation.LanguageAnnotation; | 10 | import com.lego.core.annotation.LanguageAnnotation; |
| 10 | import com.lego.core.domin.Question; | 11 | import com.lego.core.domin.Question; |
| ... | @@ -30,6 +31,7 @@ import java.util.List; | ... | @@ -30,6 +31,7 @@ import java.util.List; |
| 30 | @Service | 31 | @Service |
| 31 | public class QuestionServiceImpl implements IQuestionService { | 32 | public class QuestionServiceImpl implements IQuestionService { |
| 32 | private final QuestionMapper baseMapper; | 33 | private final QuestionMapper baseMapper; |
| 34 | private final OssService ossService; | ||
| 33 | 35 | ||
| 34 | /** | 36 | /** |
| 35 | * 查询列表 | 37 | * 查询列表 |
| ... | @@ -58,6 +60,12 @@ public class QuestionServiceImpl implements IQuestionService { | ... | @@ -58,6 +60,12 @@ public class QuestionServiceImpl implements IQuestionService { |
| 58 | if (StrUtil.isNotBlank(sb.toString())) { | 60 | if (StrUtil.isNotBlank(sb.toString())) { |
| 59 | vo.setShowStr(sb.substring(0, sb.length() - 1)); | 61 | vo.setShowStr(sb.substring(0, sb.length() - 1)); |
| 60 | } | 62 | } |
| 63 | if(StrUtil.isNotBlank(vo.getCoverOssId())){ | ||
| 64 | vo.setCoverOssUrl(ossService.selectUrlByIds(vo.getCoverOssId())); | ||
| 65 | } | ||
| 66 | if(StrUtil.isNotBlank(vo.getVideoOssId())){ | ||
| 67 | vo.setVideoOssUrl(ossService.selectUrlByIds(vo.getVideoOssUrl())); | ||
| 68 | } | ||
| 61 | } | 69 | } |
| 62 | return TableDataInfo.build(page); | 70 | return TableDataInfo.build(page); |
| 63 | } | 71 | } | ... | ... |
| ... | @@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; | ... | @@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; |
| 6 | import com.baomidou.mybatisplus.core.toolkit.Wrappers; | 6 | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| 7 | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | 7 | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| 8 | import com.lego.common.core.page.TableDataInfo; | 8 | import com.lego.common.core.page.TableDataInfo; |
| 9 | import com.lego.common.core.service.OssService; | ||
| 9 | import com.lego.common.utils.DateUtils; | 10 | import com.lego.common.utils.DateUtils; |
| 10 | import com.lego.common.utils.MessageUtils; | 11 | import com.lego.common.utils.MessageUtils; |
| 11 | import com.lego.core.annotation.LanguageAnnotation; | 12 | import com.lego.core.annotation.LanguageAnnotation; |
| ... | @@ -20,6 +21,7 @@ import lombok.RequiredArgsConstructor; | ... | @@ -20,6 +21,7 @@ import lombok.RequiredArgsConstructor; |
| 20 | import org.springframework.stereotype.Service; | 21 | import org.springframework.stereotype.Service; |
| 21 | 22 | ||
| 22 | import java.rmi.ServerException; | 23 | import java.rmi.ServerException; |
| 24 | import java.util.List; | ||
| 23 | 25 | ||
| 24 | /** | 26 | /** |
| 25 | * APP升级Service业务层处理 | 27 | * APP升级Service业务层处理 |
| ... | @@ -31,6 +33,7 @@ import java.rmi.ServerException; | ... | @@ -31,6 +33,7 @@ import java.rmi.ServerException; |
| 31 | @Service | 33 | @Service |
| 32 | public class UpgradeServiceImpl implements IUpgradeService { | 34 | public class UpgradeServiceImpl implements IUpgradeService { |
| 33 | private final UpgradeMapper baseMapper; | 35 | private final UpgradeMapper baseMapper; |
| 36 | private final OssService ossService; | ||
| 34 | 37 | ||
| 35 | /** | 38 | /** |
| 36 | * 查询列表 | 39 | * 查询列表 |
| ... | @@ -45,6 +48,12 @@ public class UpgradeServiceImpl implements IUpgradeService { | ... | @@ -45,6 +48,12 @@ public class UpgradeServiceImpl implements IUpgradeService { |
| 45 | .eq(StrUtil.isNotBlank(query.getFileType()), Upgrade::getFileType, query.getFileType()) | 48 | .eq(StrUtil.isNotBlank(query.getFileType()), Upgrade::getFileType, query.getFileType()) |
| 46 | .eq(StrUtil.isNotBlank(query.getPlatformType()), Upgrade::getPlatformType, query.getPlatformType()) | 49 | .eq(StrUtil.isNotBlank(query.getPlatformType()), Upgrade::getPlatformType, query.getPlatformType()) |
| 47 | .eq(Upgrade::getLanguage, language)); | 50 | .eq(Upgrade::getLanguage, language)); |
| 51 | List<UpgradeVo> list = page.getRecords(); | ||
| 52 | for (UpgradeVo vo : list) { | ||
| 53 | if (StrUtil.isNotBlank(vo.getFileOssId())) { | ||
| 54 | vo.setOssUrl(ossService.selectUrlByIds(vo.getFileOssId())); | ||
| 55 | } | ||
| 56 | } | ||
| 48 | return TableDataInfo.build(page); | 57 | return TableDataInfo.build(page); |
| 49 | } | 58 | } |
| 50 | 59 | ... | ... |
-
Please register or sign in to post a comment