Skip to content

Commit

Permalink
[feat/#91] Fix: url dto
Browse files Browse the repository at this point in the history
  • Loading branch information
= committed Sep 1, 2023
1 parent 71019f1 commit d3dbac7
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -187,11 +187,11 @@ public String delete(String title){
public List<Url> findStudentUrlList(String id){
UUID lectureId = assignmentRepository.findByAssignmentId(UUID.fromString(id)).getLectureId();
List<Users> usersList = enrollService.findStudentList(lectureId.toString());
System.out.println(usersList);
List<Url> studentUrlList = new ArrayList<>();
for (int i=0; i<usersList.size();i++){
Users student = usersList.get(i);
Url existUrl = urlRepository.findById(student.getUserId()).get();
if (existUrl != null){
for (Users student : usersList) {
Url existUrl = urlRepository.findByUserIdAndLectureId(student.getUserId(), lectureId);
if (existUrl != null) {
studentUrlList.add(existUrl);
}
}
Expand Down

0 comments on commit d3dbac7

Please sign in to comment.