diff --git a/src/main/java/cn/teammodel/dao/AppraiseRecordRepository.java b/src/main/java/cn/teammodel/dao/AppraiseRecordRepository.java index d5a3c97..3819e50 100644 --- a/src/main/java/cn/teammodel/dao/AppraiseRecordRepository.java +++ b/src/main/java/cn/teammodel/dao/AppraiseRecordRepository.java @@ -34,6 +34,7 @@ public interface AppraiseRecordRepository extends CosmosRepository nodes) { List children = nodes.stream().filter(item -> item.getPid() != null).collect(Collectors.toList()); @@ -308,10 +308,10 @@ public class EvaluationServiceImpl implements EvaluationService { @Override public List findVoteRecord(FindVoteRecordDto findVoteRecordDto) { - String periodId = findVoteRecordDto.getTargetId(); - String targetId = findVoteRecordDto.getTargetId(); - String targetType = findVoteRecordDto.getTargetType(); - String classId = findVoteRecordDto.getClassId(); + String periodId = findVoteRecordDto.getPeriodId(); + String targetId = StringUtils.isBlank(findVoteRecordDto.getTargetId()) ? null : findVoteRecordDto.getTargetId(); + String targetType = StringUtils.isBlank(findVoteRecordDto.getTargetType()) ? null : findVoteRecordDto.getTargetType(); + String classId = StringUtils.isBlank(findVoteRecordDto.getClassId()) ? null : findVoteRecordDto.getClassId(); User loginUser = SecurityUtil.getLoginUser(); String teacherId = loginUser.getId(); String schoolId = loginUser.getSchoolId(); diff --git a/src/test/java/cn/teammodel/TeamModelExtensionApplicationTests.java b/src/test/java/cn/teammodel/TeamModelExtensionApplicationTests.java index 55d3466..369ec77 100644 --- a/src/test/java/cn/teammodel/TeamModelExtensionApplicationTests.java +++ b/src/test/java/cn/teammodel/TeamModelExtensionApplicationTests.java @@ -86,7 +86,7 @@ class TeamModelExtensionApplicationTests { //List nodeById = appraiseRepository.findNodeById("habook", "default", "Appraise", "43e23f03-288c-4012-b5f3-4d5c022739a2"); //System.out.println(nodeById); - System.out.println(schoolRepository.findSemestersById("hbcn", "be32942d-97a9-52ba-45d6-2e5b722583f5")); + System.out.println(schoolRepository.findSemestersById("habook", "50fdecdb-6cbd-4c9a-8dc2-a627f4d6b312")); // 评价记录 //List record = appraiseRecordRepository.findScoreAndPraise("fakeStudentId1", // "2023-71fbd0bd-9a46-0490-f6b3-7d16cba4c017",