Skip to content

Commit

Permalink
Revert "[feature] 시험 상태별 시험 리스트 조회, 시험 세션 내 학생 리스트 조회, 학생 단건 조회 #6"
Browse files Browse the repository at this point in the history
  • Loading branch information
JongbeomLee623 authored Nov 2, 2024
1 parent 6fd8175 commit 1e521bb
Show file tree
Hide file tree
Showing 20 changed files with 59 additions and 341 deletions.
17 changes: 17 additions & 0 deletions .github/ISSUE_TEMPLATE/bug.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
name: Bug
about: 어떤 버그인가요?
title: ""
labels: ""
assignees: ""
---

### 어떤 버그인가요?

> 어떤 버그인지 간결하게 설명해주세요
### 예상 결과

> 예상했던 정상적인 결과가 어떤 것이었는지 설명해주세요
### 참고할만한 자료(선택)
19 changes: 19 additions & 0 deletions .github/ISSUE_TEMPLATE/feature.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
name: Feature
about: 어떤 기능을 추가하시나요?
title: ""
labels: ""
assignees: ""
---

### 어떤 기능인가요?

> 추가하려는 기능에 대해 간결하게 설명해주세요
### 작업 상세 내용

- [ ] TODO
- [ ] TODO
- [ ] TODO

### 참고할만한 자료(선택)
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# 2024-2-SCS4031-4tune-1
융합캡스톤디자인 4tune - 스마트폰 카메라를 활용한 시험감독 보조 시스템
Empty file added docs/..gitkeep
Empty file.
Empty file added src/ai/..gitkeep
Empty file.
Empty file added src/backend/..gitkeep
Empty file.
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,6 @@ public enum BaseResponseCode {
NOT_FOUND_EXAM("E0001", HttpStatus.NOT_FOUND, "시험을 찾을 수 없습니다."),
NOT_FOUND_EXAM_CODE("E0002", HttpStatus.NOT_FOUND, "시험 코드를 찾을 수 없습니다."),

// Exam Errors
EXAM_NOT_FOUND("E0001", HttpStatus.NOT_FOUND, "시험을 찾을 수 없습니다."),
SESSION_NOT_FOUND("E0002", HttpStatus.NOT_FOUND, "세션을 찾을 수 없습니다."),
EXAM_ALREADY_EXISTS("E0003", HttpStatus.CONFLICT, "이미 존재하는 시험입니다."),
INVALID_EXAM_STATUS("E0004", HttpStatus.BAD_REQUEST, "유효하지 않은 시험 상태입니다."),
EXAM_ACCESS_DENIED("E0005", HttpStatus.FORBIDDEN, "시험에 접근할 권한이 없습니다."),

// 기타 추가 오류 코드 ...

;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
import com.fortune.eyesee.common.response.BaseResponseCode;
import com.fortune.eyesee.dto.ExamCodeRequestDTO;
import com.fortune.eyesee.dto.ExamResponseDTO;
import com.fortune.eyesee.dto.UserDetailResponseDTO;
import com.fortune.eyesee.dto.UserListResponseDTO;
import com.fortune.eyesee.enums.ExamStatus;
import com.fortune.eyesee.service.ExamService;
import org.springframework.beans.factory.annotation.Autowired;
Expand Down Expand Up @@ -79,20 +77,4 @@ public ResponseEntity<BaseResponse<ExamResponseDTO>> getExamByCode(@PathVariable

return ResponseEntity.ok(new BaseResponse<>(examResponseDTO));
}

// 특정 시험 ID에 해당하는 세션 내 모든 학생들의 리스트를 조회
@GetMapping("/{examId}/sessions")
public ResponseEntity<BaseResponse<UserListResponseDTO>> getUserListByExamId(@PathVariable Integer examId) {
UserListResponseDTO response = examService.getUserListByExamId(examId);
return ResponseEntity.ok(new BaseResponse<>(response, "학생 리스트 조회 성공"));
}

// 특정 시험 ID와 사용자 ID에 해당하는 학생의 상세 정보를 조회
@GetMapping("/{examId}/sessions/{userId}")
public ResponseEntity<BaseResponse<UserDetailResponseDTO>> getUserDetailByExamIdAndUserId(
@PathVariable Integer examId,
@PathVariable Integer userId) {
UserDetailResponseDTO response = examService.getUserDetailByExamIdAndUserId(examId, userId);
return ResponseEntity.ok(new BaseResponse<>(response, "학생 상세 정보 조회 성공"));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,4 @@ public class ExamResponseDTO {
private String examNotice;

private Integer sessionId; // Session의 ID
private String examRandomCode; // 추가 examRandomCode
}

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,30 +1,29 @@
package com.fortune.eyesee.entity;


import jakarta.persistence.*;
import lombok.Data;

import jakarta.persistence.*;

@Entity
@Table(name = "User")
@Data
public class User {

@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Integer userId;

@Column(name = "sessionId", nullable = false)
private int sessionId; // 세션 ID (int 타입)

// @Column(name = "sessionId", nullable = false)
// private int sessionId; // 세션 ID (int 타입)
//
// @Column(nullable = false)
// private String userNum;
@Column(nullable = false)
private String userNum;

@ManyToOne
@JoinColumn(name = "sessionId", referencedColumnName = "sessionId")
private Session session;

private Integer userNum;
private String department;
private String userName;
private Integer seatNum;
}
private Integer seatNum; // 좌석 번호



}

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,13 @@

import com.fortune.eyesee.entity.Exam;
import com.fortune.eyesee.enums.ExamStatus;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface ExamRepository extends JpaRepository<Exam, Integer> {

// 특정 adminId에 해당하는 Exam 리스트 조회
List<Exam> findByAdmin_AdminId(Integer adminId);

Expand All @@ -19,4 +17,5 @@ public interface ExamRepository extends JpaRepository<Exam, Integer> {

// 랜덤 코드와 adminId로 Exam 조회
Exam findByExamRandomCode(String examRandomCode);

}

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit 1e521bb

Please sign in to comment.