From 48588b12fc2f62af854066053fd58bd92f0e869e Mon Sep 17 00:00:00 2001 From: winter <2436197699@qq.com> Date: Tue, 9 Jan 2024 15:49:59 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E6=92=A4=E5=9B=9E?= =?UTF-8?q?=E5=80=BC=E5=91=A8=E8=AF=84=E4=BB=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/cn/teammodel/controller/frontend/DutyController.java | 2 +- src/main/java/cn/teammodel/service/impl/DutyServiceImpl.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/cn/teammodel/controller/frontend/DutyController.java b/src/main/java/cn/teammodel/controller/frontend/DutyController.java index 704d57f..c872638 100644 --- a/src/main/java/cn/teammodel/controller/frontend/DutyController.java +++ b/src/main/java/cn/teammodel/controller/frontend/DutyController.java @@ -61,7 +61,7 @@ public class DutyController { } @PostMapping("/recallVote") - @ApiOperation("值周评价投票") + @ApiOperation("撤回评价投票") public R recallVote(@RequestBody @Valid RecallDutyVoteDto recallDutyVoteDto) { dutyService.recallVote(recallDutyVoteDto); return R.success("撤回评价成功"); diff --git a/src/main/java/cn/teammodel/service/impl/DutyServiceImpl.java b/src/main/java/cn/teammodel/service/impl/DutyServiceImpl.java index d6ef3de..ae86e27 100644 --- a/src/main/java/cn/teammodel/service/impl/DutyServiceImpl.java +++ b/src/main/java/cn/teammodel/service/impl/DutyServiceImpl.java @@ -357,7 +357,7 @@ public class DutyServiceImpl implements DutyService { Optional optional = dutyRecordRepository.findById(recordId, PK.of(String.format(PK.WEEK_DUTY_RECORD, schoolId))); WeekDutyRecord weekDutyRecord = optional.orElseThrow(() -> new ServiceException(ErrorCode.PARAMS_ERROR.getCode(), "评价记录不存在")); WeekDutyRecord.WeekDutyItem item = weekDutyRecord.getNodes().stream() - .filter(x -> nodeId.equals(x.getDutyTreeNode().getId())) + .filter(x -> nodeId.equals(x.getId())) .findFirst(). orElseThrow(() -> new ServiceException(ErrorCode.PARAMS_ERROR.getCode(), "评价记录不存在")); if (!userId.equals(item.getCreatorId())) {