fix: 修复撤回值周评价

11111
winter 12 months ago
parent 256b233b4c
commit 48588b12fc

@ -61,7 +61,7 @@ public class DutyController {
}
@PostMapping("/recallVote")
@ApiOperation("值周评价投票")
@ApiOperation("撤回评价投票")
public R<String> recallVote(@RequestBody @Valid RecallDutyVoteDto recallDutyVoteDto) {
dutyService.recallVote(recallDutyVoteDto);
return R.success("撤回评价成功");

@ -357,7 +357,7 @@ public class DutyServiceImpl implements DutyService {
Optional<WeekDutyRecord> 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())) {

Loading…
Cancel
Save