From 38f5bf39ef7701cc6ed0a4d8537a3bccdd42eb2a Mon Sep 17 00:00:00 2001 From: winter <2436197699@qq.com> Date: Mon, 27 Nov 2023 15:19:41 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E6=9F=A5=E8=AF=A2?= =?UTF-8?q?=E7=BB=93=E6=9E=9C=E5=A4=9A=E5=B0=B1=E5=87=BA=E9=94=99=E7=9A=84?= =?UTF-8?q?bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/cn/teammodel/dao/EvaluationRepository.java | 2 +- .../java/cn/teammodel/service/impl/EvaluationServiceImpl.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/cn/teammodel/dao/EvaluationRepository.java b/src/main/java/cn/teammodel/dao/EvaluationRepository.java index d6c22a1..aa28cd7 100644 --- a/src/main/java/cn/teammodel/dao/EvaluationRepository.java +++ b/src/main/java/cn/teammodel/dao/EvaluationRepository.java @@ -18,7 +18,7 @@ import org.springframework.stereotype.Repository; @Repository public interface EvaluationRepository extends CosmosRepository { Appraise findBySchoolId(String schoolId, PartitionKey partitionKey); - Appraise findBySchoolIdAndPeriodId(String schoolId, String periodId, PartitionKey partitionKey); + Appraise findAppraiseBySchoolIdAndPeriodIdAndCode(String schoolId, String periodId, String code); } diff --git a/src/main/java/cn/teammodel/service/impl/EvaluationServiceImpl.java b/src/main/java/cn/teammodel/service/impl/EvaluationServiceImpl.java index ce13739..9bc96cc 100644 --- a/src/main/java/cn/teammodel/service/impl/EvaluationServiceImpl.java +++ b/src/main/java/cn/teammodel/service/impl/EvaluationServiceImpl.java @@ -47,7 +47,7 @@ public class EvaluationServiceImpl implements EvaluationService { String schoolId = loginUser.getSchoolId(); // 拿到要新增节点的原始数据 - Appraise appraise = evaluationRepository.findBySchoolIdAndPeriodId(schoolId, periodId, PK.of(PK.PK_APPRAISE)); + Appraise appraise = evaluationRepository.findAppraiseBySchoolIdAndPeriodIdAndCode(schoolId, periodId, PK.PK_APPRAISE); if (appraise == null) { throw new ServiceException(ErrorCode.PARAMS_ERROR.getCode(), "学校评价数据不存在"); }