Commit 8c4389af authored by wdy's avatar wdy

Merge branch 'dev' into 'master'

dev - master 36

See merge request !396
parents 24df301e 6bcb4ed6
......@@ -195,14 +195,16 @@ public class ReviewEnterpriseArchiveServiceImpl extends ServiceImpl<ReviewEnterp
ReviewEnterpriseArchive reviewEnterpriseArchive = reviewEnterpriseArchiveMapper.selectById(request.getId());
// 按逗号拆分字符串
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);
if (reviewEnterpriseArchive.getPhoto() != null && reviewEnterpriseArchive.getPhotoName() != null) {
String[] photoUrls = reviewEnterpriseArchive.getPhoto().split(",");
String[] photoNames = reviewEnterpriseArchive.getPhotoName().split(",");
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