Skip to content

Conversation

@gmltn9233
Copy link
Contributor

🔧연결된 이슈

🛠️작업 내용

  • 회원가입시 소프트웨어학과, 데이터사이언스학과 추가
  • IniData, InitFileData` 리팩토링

🤷‍♂️PR이 필요한 이유

1. 회원가입

회원가입시 누락되어있던 학과 선택사항에 소프트웨어학과, 데이터사이언스학과 항목을 추가하였습니다.

2. IniData , InitFileData

실제 운영 DB와 동일한 개발환경을 유지할 수 있게 Init 파일들을 리팩토링하였습니다.
운영자 3명의 학번으로 로그인이 가능합니다.

2.1 띄어쓰기 오류

#50'교과목명 불일치' 수정으로 인해 English Listening Practice 1과 같이 띄어쓰기가 적용된 영문 과목들이 gonghak_course.csv 파일에 반영이 안되는 오류가 발생하였습니다. (학교측의 교과목명은 한글은 띄어쓰기 X, 영문 과목은 띄워쓰기 O)

그래서 CoursesDao.findByNameIgnoreSpaces 메서드를 추가하여 이를 해결하였습니다.

3. 추천 서비스

이슈에서 언급했다 시피, ComputerMajorGonghakRecommendService 를 이용하여 새로 추가된 학과를 추가하려 했으나, 아래와 같이 전정통 만 분리되어 있기에 따로 로직을 추가하지 않았습니다.

if (majorsDomain.getMajor().contains(ELEC_INFO.getName())) {
    return applicationContext.getBean("elecInfoMajorGonghakRecommendService",
    ElecInfoMajorGonghakRecommendService .class);
}
return applicationContext.getBean("computerMajorGonghakRecommendService",
    ComputerMajorGonghakRecommendService .class);

✔️PR 체크리스트

  • 필요한 테스트를 작성했는가?
  • 다른 코드를 깨뜨리지 않았는가?
  • 연결된 이슈 외에 다른 이슈를 해결한 코드가 담겨있는가?

findStandard 메서드를 최신년도 기준을 불러오도록 변경하고 연관된 사항들을 변경사항에 맞게 변경하였습니다.
직관적인 이해를 위해 YEAR -> LATEST_YAER 변경
회원가입 화면에서 선택할수 있는 학과에 '소프트웨어학과' , '데이터 사이언스학과' 추가
추가: 소프트웨어학과, 데이터사이언스학과, 테스트 유저(admin 3명), 4개 학과 24년도 abeek
삭제: 기존 테스트 유저, 테스트 더미 데이터
1. 운영용 DB에 동일한 DB 환경 구성
2. 과목명 띄어쓰기 오류 해결을 위한 CoursesDao.findByNameIgnoreSpaces 메서드 추가
3. MajorsDao.findById 메서드 추가
@gmltn9233
Copy link
Contributor Author

gmltn9233 commented Aug 20, 2024

이전 PR에서 시작한거라 refactor: singup.html 부터 보시면 됩니다.

  • 리뷰할때 로컬에서 정상 작동되는지 확인해주세요!

@whxogus215
Copy link
Contributor

whxogus215 commented Aug 21, 2024

InitData에서 확인하는 admin1번의 학번이 잘못 적혀있어서 서브모듈 내 properties 파일을 수정하였고, 이를 해당 브랜치에 커밋하였습니다.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

csv 파일 Coursegonghak_courrse로 통일한거 진짜 너무 깔끔하고 좋습니다... 👍👍👍👍
근데 Course도 아예 소문자로 시작해서 같이 통일하는건 어떠신가요?? 아니면 gonghak_course를 대문자로 시작하거나??

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

course, gonghak_course 소문자로 통일하도록 수정하였습니다.


CoursesDomain findByName(String name);

// 띄워쓰기를 제외한 course.name 과 비교해서 반환하는 쿼리문
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

띄어쓰기로 맞춤법 수정하면 좋을 것 같습니다!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

띄어쓰기로 맞춤법 수정하면 좋을 것 같습니다!

헉 오타체크 감사합니닷

CoursesDomain findByName(String name);

// 띄워쓰기를 제외한 course.name 과 비교해서 반환하는 쿼리문
@Query(value ="select * from course where REPLACE(name, ' ', '') = :name", nativeQuery = true)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

오오 nativeQuery 옵션을 true로 설정하면, JPQL이 아닌 SQL 문법으로 쿼리를 작성할 수 있는건가요??

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

오오 nativeQuery 옵션을 true로 설정하면, JPQL이 아닌 SQL 문법으로 쿼리를 작성할 수 있는건가요??

넵 REPLACE 문법이 MySQL 문법이라 해당 결과값을 얻기 위해서는 네이티브 쿼리를 사용해야 합니다!

Copy link
Contributor

@whxogus215 whxogus215 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

로컬에서 실행한 결과, 전정통 기준 공학인증 최소인증 학점이 모두 2024년 기준으로 맞추어져 있으며, 지난 온라인 회의 때 발생했던 문쓰발, 서철이 2학점으로 인식되던 문제도 모두 해결되었음을 확인했습니다!

@gmltn9233
Copy link
Contributor Author

InitData에서 확인하는 admin1번의 학번이 잘못 적혀있어서 서브모듈 내 properties 파일을 수정하였고, 이를 해당 브랜치에 커밋하였습니다.

확인했습니다~

1. 띄워쓰기 -> 띄어쓰기
2. Course.csv -> course.csv
@gmltn9233 gmltn9233 self-assigned this Aug 24, 2024
@whxogus215 whxogus215 merged commit 32e57f5 into develop Aug 26, 2024
@gmltn9233 gmltn9233 deleted the refactor-소프트웨어학과-데이터사이언스학과-추가 branch September 23, 2024 04:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants