From 87eda13fbcc0e726ebf50420cfbd059910c36d32 Mon Sep 17 00:00:00 2001 From: luogw <3132758203@qq.com> Date: Thu, 5 Mar 2026 08:52:01 +0800 Subject: [PATCH] =?UTF-8?q?bug=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/KnowledgePointApplicationServiceImpl.java | 4 ++-- .../service/impl/SaveOrUpdateTaskDomainServiceImpl.java | 8 +++++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/project/information/application/impl/KnowledgePointApplicationServiceImpl.java b/src/main/java/com/project/information/application/impl/KnowledgePointApplicationServiceImpl.java index f0f01a9..266f3a0 100644 --- a/src/main/java/com/project/information/application/impl/KnowledgePointApplicationServiceImpl.java +++ b/src/main/java/com/project/information/application/impl/KnowledgePointApplicationServiceImpl.java @@ -68,7 +68,7 @@ public class KnowledgePointApplicationServiceImpl implements KnowledgePointAppli } catch (Exception e) { log.error("文件解析失败:{}", fileMap.get(id).getOriginalFilename(), e); //更新资料状态 - updateStatuInformation(null,InformationParseStatusEnum.Fail.getValue(),id); + updateStatuInformation(null,InformationParseStatusEnum.Success.getValue(),id); } } } @@ -108,7 +108,7 @@ public class KnowledgePointApplicationServiceImpl implements KnowledgePointAppli }else{ log.error("获取知识点失败:{}", "不存在知识点"); //更新状态 - updateStatuInformation(null,InformationParseStatusEnum.Fail.getValue(),id); + updateStatuInformation(null,InformationParseStatusEnum.Success.getValue(),id); } } diff --git a/src/main/java/com/project/task/domain/service/impl/SaveOrUpdateTaskDomainServiceImpl.java b/src/main/java/com/project/task/domain/service/impl/SaveOrUpdateTaskDomainServiceImpl.java index d51ef9d..fc0abdc 100644 --- a/src/main/java/com/project/task/domain/service/impl/SaveOrUpdateTaskDomainServiceImpl.java +++ b/src/main/java/com/project/task/domain/service/impl/SaveOrUpdateTaskDomainServiceImpl.java @@ -127,9 +127,11 @@ public class SaveOrUpdateTaskDomainServiceImpl implements SaveOrUpdateTaskDomain throw new BusinessErrorException("考试任务名称不能为空"); } //校验考试名称是否存在 - long count = taskBaseService.count(new LambdaQueryWrapper().eq(TaskEntity::getName, dto.getName())); - if (count > 0){ - throw new BusinessErrorException("考试任务名称已存在"); + if (dto.getId() == null){ + long count = taskBaseService.count(new LambdaQueryWrapper().eq(TaskEntity::getName, dto.getName())); + if (count > 0){ + throw new BusinessErrorException("考试任务名称已存在"); + } } if (StrUtil.length(dto.getName()) > 10) {