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())) {