| | |
| | | article=this.getById(articleDTO.getId()); |
| | | } |
| | | article.setMemberId(articleDTO.getMemberId()); |
| | | |
| | | article.setArticleType(ArticleTypeEnum.USER_POSTING); |
| | | article.setStatus(AuditStatusEnum.TO_BE_REVIEWED); |
| | | article.setContent(articleDTO.getContent()); |
| | | article.setTitle(articleDTO.getTitle()); |
| | | List<String> urlList=new ArrayList<>(); |
| | | if (articleDTO.getRticleImageUrl().length>0){ |
| | | for (MultipartFile file:articleDTO.getRticleImageUrl()){ |
| | | try { |
| | | String url= HuaWeiOBSUtil.obsUpload(file); |
| | | urlList.add(url); |
| | | } catch (IOException e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | } |
| | | article.setImages(urlList.toString()); |
| | | } |
| | | article.setImages(articleDTO.getRticleImageUrl()); |
| | | this.saveOrUpdate(article); |
| | | |
| | | } |