| | |
| | | import cn.hutool.core.date.DateUtil; |
| | | import cn.hutool.core.util.PageUtil; |
| | | import cn.hutool.core.util.StrUtil; |
| | | import cn.hutool.crypto.SecureUtil; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.validation.annotation.Validated; |
| | |
| | | @PostMapping("/blogArticle/add") |
| | | @BusinessLog(title = "外部blog系统_blog文章_增加", opType = LogAnnotionOpTypeEnum.ADD) |
| | | public ResponseData add(@RequestBody @Validated(BlogArticleAddDto.add.class) BlogArticleAddDto addDto) { |
| | | if (!SecureUtil.md5(addDto.getSecret()).equals(ConstantContextHolder.getPushCode())) { |
| | | if (!addDto.getSecret().equals(ConstantContextHolder.getPushCode())) { |
| | | throw new BlogException("口令错误.."); |
| | | } |
| | | |
| | |
| | | param.put("pageSize", queryDto.getPageSize()); |
| | | param.put("typeId", queryDto.getTypeId()); |
| | | param.put("fileType", queryDto.getFileType()); |
| | | param.put("faceExcludeFile", MyConstant.faceExcludeFile); |
| | | |
| | | String blogSourcePrefix = ConstantContextHolder.getBlogSourcePrefix(); |
| | | |
| | |
| | | Map<String, Object> param = new HashMap<>(16); |
| | | param.put("pageNo", PageUtil.getStart(queryDto.getPageNo() - 1, queryDto.getPageSize())); |
| | | param.put("pageSize", queryDto.getPageSize()); |
| | | param.put("id", queryDto.getId()); |
| | | |
| | | if (queryDto.getActiveKey().equals(MyConstant.platformType.type_2)) { |
| | | param.put("typeIds", new Long[]{10L});//临时id,后续需要修改(前方高能分类) |
| | | if (queryDto.getActiveKey().equals(MyConstant.platformType.type_1)) { |
| | | param.put("typeIds", new Long[]{66L});//临时id |
| | | param.put("fileType", MyConstant.FileType.fileTypeVideo_3); |
| | | } else if (queryDto.getActiveKey().equals(MyConstant.platformType.type_2)) { |
| | | param.put("typeIds", new Long[]{55L});//临时id,后续需要修改(前方高能分类) |
| | | param.put("fileType", MyConstant.FileType.fileTypeVideo_3); |
| | | } else if (queryDto.getActiveKey().equals(MyConstant.platformType.type_3)) { |
| | | param.put("typeIds", new Long[]{99L});//临时id,后续需要修改 |
| | | param.put("fileType", MyConstant.FileType.fileTypePhoto_9); |
| | | param.put("typeIds", new Long[]{99L});//临时id,后续需要修改(图组) |
| | | param.put("fileType", MyConstant.FileType.fileTypePictures_5); |
| | | } else { |
| | | param.put("typeIds", new Long[]{4L});//临时id,后续需要修改(音乐分类) |
| | | param.put("typeIds", new Long[]{66L});//临时id,后续需要修改(音乐分类) |
| | | param.put("fileType", MyConstant.FileType.fileTypeVideo_3); |
| | | } |
| | | |
| | |
| | | |
| | | BeanUtil.copyProperties(find, vo); |
| | | |
| | | //补充视频组,图片组的url |
| | | if (StrUtil.isNotEmpty(vo.getPictureIds())) { |
| | | vo.setPictureUrlList(this.getBlogSourceURLBatch(Arrays.stream(vo.getPictureIds().split(SymbolConstant.COMMA)).collect(Collectors.toList()))); |
| | | } |
| | | if (StrUtil.isNotEmpty(vo.getVideoIds())) { |
| | | vo.setVideoUrlList(this.getBlogSourceURLBatch(Arrays.stream(vo.getVideoIds().split(SymbolConstant.COMMA)).collect(Collectors.toList()))); |
| | | } |
| | | |
| | | |
| | | String tempURL = this.getBlogSourceURL(find.getArticleFileId()); |
| | | |