|
|
@ -279,18 +279,18 @@ public class TopicDraftServiceImpl extends BaseServiceImpl<TopicDraftDao, TopicD |
|
|
|
if(CollectionUtils.isNotEmpty(formDTO.getImageList())){ |
|
|
|
TopicDraftAttachmentDTO attachment = new TopicDraftAttachmentDTO(); |
|
|
|
int sort = 0; |
|
|
|
for(FileDTO file : formDTO.getImageList()){ |
|
|
|
attachment.setAttachmentUrl(file.getUrl()); |
|
|
|
for(String url : formDTO.getImageList()){ |
|
|
|
attachment.setAttachmentUrl(url); |
|
|
|
attachment.setTopicDraftId(topic.getId()); |
|
|
|
attachment.setCreatedBy(tokenDto.getUserId()); |
|
|
|
attachment.setAttachmentFormat(file.getUrl().substring(file.getUrl().lastIndexOf(".") + NumConstant.ONE).toLowerCase()); |
|
|
|
attachment.setAttachmentFormat(url.substring(url.lastIndexOf(".") + NumConstant.ONE).toLowerCase()); |
|
|
|
attachment.setSort(sort++); |
|
|
|
attachment.setAttachmentType("image"); |
|
|
|
topicDraftAttachmentService.save(attachment); |
|
|
|
|
|
|
|
ImgTaskDTO task = new ImgTaskDTO(); |
|
|
|
task.setDataId(attachment.getId()); |
|
|
|
task.setUrl(file.getUrl()); |
|
|
|
task.setUrl(url); |
|
|
|
imageDTOList.add(task); |
|
|
|
} |
|
|
|
} |
|
|
@ -671,11 +671,11 @@ public class TopicDraftServiceImpl extends BaseServiceImpl<TopicDraftDao, TopicD |
|
|
|
if(CollectionUtils.isNotEmpty(formDTO.getImageList())){ |
|
|
|
ResiTopicAttachmentEntity attachment = new ResiTopicAttachmentEntity(); |
|
|
|
int sort = 0; |
|
|
|
for(FileDTO file : formDTO.getImageList()){ |
|
|
|
attachment.setAttachmentUrl(file.getUrl()); |
|
|
|
for(String url : formDTO.getImageList()){ |
|
|
|
attachment.setAttachmentUrl(url); |
|
|
|
attachment.setTopicId(topic.getId()); |
|
|
|
attachment.setCreatedBy(tokenDto.getUserId()); |
|
|
|
attachment.setAttachmentFormat(file.getUrl().substring(file.getUrl().lastIndexOf(".") + NumConstant.ONE).toLowerCase()); |
|
|
|
attachment.setAttachmentFormat(url.substring(url.lastIndexOf(".") + NumConstant.ONE).toLowerCase()); |
|
|
|
attachment.setSort(sort++); |
|
|
|
attachment.setAttachmentType("image"); |
|
|
|
resiTopicAttachmentDao.insertOne(attachment); |
|
|
|