-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
戴高阔
committed
Jun 14, 2023
1 parent
d582451
commit 62d45f6
Showing
6 changed files
with
35 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,6 +15,8 @@ | |
import org.springframework.web.multipart.MultipartFile; | ||
import org.springframework.web.multipart.MultipartHttpServletRequest; | ||
|
||
import org.hzero.boot.file.dto.FileDTO; | ||
import org.hzero.core.util.ResponseUtils; | ||
import io.choerodon.core.exception.CommonException; | ||
import io.choerodon.core.oauth.CustomUserDetails; | ||
import io.choerodon.core.oauth.DetailsHelper; | ||
|
@@ -33,12 +35,8 @@ | |
import io.choerodon.test.manager.infra.feign.operator.RemoteIamOperator; | ||
import io.choerodon.test.manager.infra.mapper.TestAttachmentMapper; | ||
import io.choerodon.test.manager.infra.mapper.TestCycleCaseAttachmentRelMapper; | ||
import io.choerodon.test.manager.infra.util.AttachmentUtils; | ||
import io.choerodon.test.manager.infra.util.IAttachmentPreviewInfoUtil; | ||
|
||
import org.hzero.boot.file.dto.FileDTO; | ||
import org.hzero.core.util.ResponseUtils; | ||
|
||
/** | ||
* Created by [email protected] on 6/11/18. | ||
*/ | ||
|
@@ -62,8 +60,6 @@ public class TestCycleCaseAttachmentRelServiceImpl implements TestCycleCaseAttac | |
private TestCycleCaseAttachmentRelUploadService testCycleCaseAttachmentRelUploadService; | ||
@Autowired | ||
private FilePathService filePathService; | ||
@Autowired | ||
private AttachmentUtils attachmentUtils; | ||
|
||
@Override | ||
public void deleteAttachmentRel(Long projectId,Long attachId) { | ||
|
@@ -201,7 +197,10 @@ private void handAttachment(ProjectDTO project, List<TestCycleCaseAttachmentRelV | |
if (CollectionUtils.isEmpty(testCycleCaseAttachmentRelVOS)) { | ||
return; | ||
} | ||
List<String> fileUrls = testCycleCaseAttachmentRelVOS.stream().map(TestCycleCaseAttachmentRelVO::getUrl).collect(Collectors.toList()); | ||
List<String> fileUrls = testCycleCaseAttachmentRelVOS.stream() | ||
.peek(testCycleCaseAttachmentRel -> testCycleCaseAttachmentRel.setFileKey(testCycleCaseAttachmentRel.getUrl())) | ||
.map(TestCycleCaseAttachmentRelVO::getUrl) | ||
.collect(Collectors.toList()); | ||
if(CollectionUtils.isEmpty(fileUrls)) { | ||
return; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,6 +11,8 @@ | |
import org.springframework.stereotype.Service; | ||
import org.springframework.transaction.annotation.Transactional; | ||
|
||
import org.hzero.boot.file.dto.FileDTO; | ||
import org.hzero.core.util.ResponseUtils; | ||
import io.choerodon.core.domain.Page; | ||
import io.choerodon.core.exception.CommonException; | ||
import io.choerodon.core.oauth.CustomUserDetails; | ||
|
@@ -29,14 +31,10 @@ | |
import io.choerodon.test.manager.infra.feign.FileFeignClient; | ||
import io.choerodon.test.manager.infra.feign.operator.RemoteIamOperator; | ||
import io.choerodon.test.manager.infra.mapper.*; | ||
import io.choerodon.test.manager.infra.util.AttachmentUtils; | ||
import io.choerodon.test.manager.infra.util.ConvertUtils; | ||
import io.choerodon.test.manager.infra.util.IAttachmentPreviewInfoUtil; | ||
import io.choerodon.test.manager.infra.util.PageUtil; | ||
|
||
import org.hzero.boot.file.dto.FileDTO; | ||
import org.hzero.core.util.ResponseUtils; | ||
|
||
/** | ||
* Created by [email protected] on 6/11/18. | ||
*/ | ||
|
@@ -66,14 +64,10 @@ public class TestCycleCaseStepServiceImpl implements TestCycleCaseStepService { | |
@Autowired | ||
private TestCycleCaseMapper testCycleCaseMapper; | ||
@Autowired | ||
private FilePathService filePathService; | ||
@Autowired | ||
private RemoteIamOperator remoteIamOperator; | ||
@Autowired | ||
private FileFeignClient fileFeignClient; | ||
@Autowired | ||
private AttachmentUtils attachmentUtils; | ||
|
||
|
||
@Override | ||
public void update(TestCycleCaseStepVO testCycleCaseStepVO) { | ||
TestCycleCaseStepDTO testCycleCaseStepDTO = modelMapper.map(testCycleCaseStepVO, TestCycleCaseStepDTO.class); | ||
|
@@ -298,7 +292,10 @@ private void handAttachment(Long projectId, List<TestCycleCaseStepVO> testCycleC | |
if (CollectionUtils.isEmpty(testCycleCaseAttachmentRelVOS)) { | ||
return; | ||
} | ||
List<String> fileUrls = testCycleCaseAttachmentRelVOS.stream().map(TestCycleCaseAttachmentRelVO::getUrl).collect(Collectors.toList()); | ||
List<String> fileUrls = testCycleCaseAttachmentRelVOS.stream() | ||
.peek(testCycleCaseAttachmentRel -> testCycleCaseAttachmentRel.setFileKey(testCycleCaseAttachmentRel.getUrl())) | ||
.map(TestCycleCaseAttachmentRelVO::getUrl) | ||
.collect(Collectors.toList()); | ||
if(CollectionUtils.isEmpty(fileUrls)) { | ||
return; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters