refactor(缺陷管理): 优化富文本图片处理逻辑

This commit is contained in:
song-cc-rock 2024-09-20 14:53:06 +08:00 committed by Craftsman
parent 795c128136
commit 95209738b0
1 changed files with 2 additions and 3 deletions

View File

@ -1374,10 +1374,9 @@ public class BugService {
* @param request 请求参数 * @param request 请求参数
*/ */
private void filterRichTextTmpFile(BugEditRequest request) { private void filterRichTextTmpFile(BugEditRequest request) {
// 项目模板带过来的图片文件不处理 // 非缺陷来源的图片过滤不处理
if (CollectionUtils.isNotEmpty(request.getRichTextTmpFileIds())) { if (CollectionUtils.isNotEmpty(request.getRichTextTmpFileIds())) {
request.getRichTextTmpFileIds().removeIf(tmpFileId -> request.getDescription().contains("/project/template/img/preview/" + request.getProjectId() + "/" + tmpFileId) || request.getRichTextTmpFileIds().removeIf(tmpFileId -> !request.getDescription().contains("/bug/attachment/preview/md/" + request.getProjectId() + "/" + tmpFileId));
request.getDescription().contains("/attachment/download/file/" + request.getProjectId() + "/" + tmpFileId));
} }
} }