feat(测试跟踪): 功能用例&缺陷管理附件功能改造
--story=1006991 --user=宋昌昌 【测试跟踪】功能用例&缺陷增加附件功能支持视频文件(1.20分支同步上) https://www.tapd.cn/55049933/s/1194201
This commit is contained in:
parent
4ccc8c0b03
commit
d6587265cf
|
@ -178,6 +178,10 @@ public class TestCaseService {
|
||||||
private TestReviewTestCaseService testReviewTestCaseService;
|
private TestReviewTestCaseService testReviewTestCaseService;
|
||||||
@Resource
|
@Resource
|
||||||
private FileAttachmentMetadataMapper fileAttachmentMetadataMapper;
|
private FileAttachmentMetadataMapper fileAttachmentMetadataMapper;
|
||||||
|
@Resource
|
||||||
|
private FileMetadataMapper fileMetadataMapper;
|
||||||
|
@Resource
|
||||||
|
private FileContentMapper fileContentMapper;
|
||||||
|
|
||||||
private ThreadLocal<Integer> importCreateNum = new ThreadLocal<>();
|
private ThreadLocal<Integer> importCreateNum = new ThreadLocal<>();
|
||||||
private ThreadLocal<Integer> beforeImportCreateNum = new ThreadLocal<>();
|
private ThreadLocal<Integer> beforeImportCreateNum = new ThreadLocal<>();
|
||||||
|
@ -2620,10 +2624,12 @@ public class TestCaseService {
|
||||||
TestCaseFileExample testCaseFileExample = new TestCaseFileExample();
|
TestCaseFileExample testCaseFileExample = new TestCaseFileExample();
|
||||||
testCaseFileExample.createCriteria().andCaseIdEqualTo(testCaseFile.getCaseId()).andFileIdEqualTo(testCaseFile.getFileId());
|
testCaseFileExample.createCriteria().andCaseIdEqualTo(testCaseFile.getCaseId()).andFileIdEqualTo(testCaseFile.getFileId());
|
||||||
testCaseFileMapper.updateByExampleSelective(newTestCaseFile, testCaseFileExample);
|
testCaseFileMapper.updateByExampleSelective(newTestCaseFile, testCaseFileExample);
|
||||||
|
fileMetadataMapper.deleteByPrimaryKey(fileMetadata.getId());
|
||||||
}
|
}
|
||||||
if (StringUtils.isNotEmpty(filename) && fileContents.size() == 1) {
|
if (StringUtils.isNotEmpty(filename) && fileContents.size() == 1) {
|
||||||
byte[] bytes = fileContents.get(0).getFile();
|
byte[] bytes = fileContents.get(0).getFile();
|
||||||
FileUtils.byteToFile(bytes, uploadPath, filename);
|
FileUtils.byteToFile(bytes, uploadPath, filename);
|
||||||
|
fileContentMapper.deleteByPrimaryKey(fileContents.get(0).getFileId());
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue