Commit bdbc4524 authored by wdy's avatar wdy

车企文件添加

parent 66cda2a3
......@@ -195,15 +195,17 @@ public class ReviewEnterpriseArchiveServiceImpl extends ServiceImpl<ReviewEnterp
ReviewEnterpriseArchive reviewEnterpriseArchive = reviewEnterpriseArchiveMapper.selectById(request.getId());
// 按逗号拆分字符串
// 将拆分后的字符串配对创建AttachmentsVO对象,并加入到List中
List<AttachmentsVO> attachmentsVOList = new ArrayList<>();
if (reviewEnterpriseArchive.getPhoto() != null && reviewEnterpriseArchive.getPhotoName() != null) {
String[] photoUrls = reviewEnterpriseArchive.getPhoto().split(",");
String[] photoNames = reviewEnterpriseArchive.getPhotoName().split(",");
// 将拆分后的字符串配对创建AttachmentsVO对象,并加入到List中
List<AttachmentsVO> attachmentsVOList = new ArrayList<>();
for (int i = 0; i < photoUrls.length; i++) {
AttachmentsVO vo = new AttachmentsVO(photoUrls[i], photoNames[i]);
attachmentsVOList.add(vo);
}
}
reviewEnterpriseArchive.setUrl(attachmentsVOList);
return reviewEnterpriseArchive;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment