-
Notifications
You must be signed in to change notification settings - Fork 2
refactor: gonghakcoursesdao #65
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weโll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
findStandard ๋ฉ์๋๋ฅผ ์ต์ ๋ ๋ ๊ธฐ์ค์ ๋ถ๋ฌ์ค๋๋ก ๋ณ๊ฒฝํ๊ณ ์ฐ๊ด๋ ์ฌํญ๋ค์ ๋ณ๊ฒฝ์ฌํญ์ ๋ง๊ฒ ๋ณ๊ฒฝํ์์ต๋๋ค.
์ง๊ด์ ์ธ ์ดํด๋ฅผ ์ํด YEAR -> LATEST_YAER ๋ณ๊ฒฝ
ํ์๊ฐ์ ํ๋ฉด์์ ์ ํํ ์ ์๋ ํ๊ณผ์ '์ํํธ์จ์ดํ๊ณผ' , '๋ฐ์ดํฐ ์ฌ์ด์ธ์คํ๊ณผ' ์ถ๊ฐ
์ถ๊ฐ: ์ํํธ์จ์ดํ๊ณผ, ๋ฐ์ดํฐ์ฌ์ด์ธ์คํ๊ณผ, ํ ์คํธ ์ ์ (admin 3๋ช ), 4๊ฐ ํ๊ณผ 24๋ ๋ abeek ์ญ์ : ๊ธฐ์กด ํ ์คํธ ์ ์ , ํ ์คํธ ๋๋ฏธ ๋ฐ์ดํฐ
1. ์ด์์ฉ DB์ ๋์ผํ DB ํ๊ฒฝ ๊ตฌ์ฑ 2. ๊ณผ๋ชฉ๋ช ๋์ด์ฐ๊ธฐ ์ค๋ฅ ํด๊ฒฐ์ ์ํ CoursesDao.findByNameIgnoreSpaces ๋ฉ์๋ ์ถ๊ฐ 3. MajorsDao.findById ๋ฉ์๋ ์ถ๊ฐ
- 19010693 -> 18010693
1. ๋์์ฐ๊ธฐ -> ๋์ด์ฐ๊ธฐ 2. Course.csv -> course.csv
์ธ์ฆ์๊ฑด ์ธ๋ถํญ๋ชฉ์ด ์์ ์ ์ ํ๋ ๋๋ฅผ ๋ฐ๋ฅด๋๋ก ๋ฆฌํฉํ ๋ง
|
ํด๋น PR์ 8f01377 ์ปค๋ฐ๋ง ํ์ธํ๋ฉด ๋ ๊ฒ ๊ฐ๋ค์. |
| + "where CCD.userDomain.studentId =:studentId and GCD.majorsDomain.id = :majorsId and CCD.year = GCD.year") | ||
| List<GonghakCoursesByMajorDto> findUserCompletedCourses(@Param("studentId") Long studentId, @Param("majorsId") Long majorId); | ||
| + "where CCD.userDomain.studentId =:studentId and GCD.majorsDomain.id = :majorsId and GCD.year = :year") | ||
| List<GonghakCoursesByMajorDto> findUserCompletedCourses(@Param("studentId") Long studentId, @Param("majorsId") Long majorId, @Param("year") Long year); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
์ฌ์ฉ์์ ๊ธฐ์ด์ ๊ณผ๋ชฉ๊ณผ ์ฌ์ฉ์๊ฐ ์ํ ํ๊ณผ์ ๊ณตํ์ธ์ฆ ๊ณผ๋ชฉ์ ์กฐ์ธํ ๋, ์ฌ์ฉ์์ ์
ํ๋
๋๋ฅผ ์กฐ๊ฑด์ผ๋ก ์ถ๊ฐํ๋๊ฒ ์๊ตฌ์ฌํญ์ ํด๊ฒฐํจ์ ์์ด์ ์ค์ํ ํฌ์ธํธ์ธ ๊ฒ ๊ฐ์ต๋๋ค! ๋ณ๊ฒฝ์ฌํญ ํ์ธํ์ต๋๋ค ๐
| public List<GonghakCoursesByMajorDto> findUserCompletedCourses( | ||
| Long studentId, MajorsDomain majorsDomain) { | ||
| return gonghakCoursesDao.findUserCompletedCourses(studentId,majorsDomain.getId()); | ||
| return gonghakCoursesDao.findUserCompletedCourses(studentId,majorsDomain.getId(), studentId/DIVIDER); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ํ์ฌ studentId/DIVIDER๊ฐ ์ฌ์ฉ๋๋ ์ฝ๋๋ ์ฌ์ฉ์๊ฐ ์ด์ํ ๊ณผ๋ชฉ๊ณผ ์ฌ์ฉ์๊ฐ ์ด์ํ์ง ์์ ๊ณผ๋ชฉ์ ์กฐํํ ๋์
๋๋ค. ๊ทธ๋์ DIVIDER๋ฅผ ์์๋ก ๋นผ๋ด์ ๋งค์ง๋๋ฒ๋ฅผ ์ ๊ฑฐํ ๊ฒ๋ ์๋ฏธ๊ฐ ์์ง๋ง, studentId/DIVIDER๋ผ๋ ๊ฐ์ด ์ฌ์ฉ์์ ์
ํ๋
๋๋ฅผ ๋ํ๋ธ๋ค๋ ์๋ฏธ๋ฅผ ์ ๋ฌํ๋ ๊ฒ๋ ์ฝ๋๋ฅผ ์ดํดํจ์ ์์ด์ ์ค์ํ ๊ฒ ๊ฐ์ต๋๋ค.
์ ๋ฆฌํ์๋ฉด, studentId/DIVIDER๋ ์์๋ก ๋นผ๋ด์ด ์ด๊ฒ์ด ์ฌ์ฉ์์ ์
ํ๋
๋์์ ๋ํ๋ผ ์ ์๋ ๋ณ์๋ช
์ ๋ถ์ฌํ๋ฉด ์ฝ๋๋ฅผ ์ดํดํจ์ ์์ด์ ๋์์ด ๋ ๊ฒ ๊ฐ์ต๋๋ค!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
studentId๊ฐ ๋ณ์๋ผ studentId / DIVIDER ๋ฅผ ์์๋ก ๋ง๋ค์ ์์ง ์๋์?? ์๋๋ฉด ์
ํ๋
๋๋ฅผ ๋ถ๋ฌ์จ๋ค๋ ์๋ฏธ์ ๋ฉ์๋๋ฅผ ์ถ๊ฐํ์ฌ ๊ฐ๋
์ฑ์ ๋์ผ ์ ์์๊ฒ ๊ฐ์ต๋๋ค.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
์ ๋ง๋ค์ 'studentId'๊ฐ ๋ณ์๋ผ๋๊ฑธ ์๊ฐ ๋ชปํ๋ค์ใ ใ ์ง๊ธ์ฒ๋ผ ๋๋ฌ๋ ๊ด์ฐฎ์ ๊ฒ ๊ฐ์ต๋๋ค!
๐ง์ฐ๊ฒฐ๋ ์ด์
๐ ๏ธ์์ ๋ด์ฉ
findUserCompletedCourses์ ์ฟผ๋ฆฌ๋ฌธ์ ์์ ์ ์ ํ๋ ๋ ๊ธฐ์ค์ ๊ณผ๋ชฉ์ ๋ถ๋ฌ์ค๋๋ก ๋ฆฌํฉํ ๋ง๐คทโโ๏ธPR์ด ํ์ํ ์ด์
์๋ฅผ ๋ค์ด
๋ฐ์ดํฐ์ฌ์ด์ธ์คํ๊ณผ์ 19๋ ๋ ๊ต์์ `ERP' , 'ELP'๋ฅผ ์๊ฐํด์ผํ๋๋ฐ, ํด๋น ๊ณผ๋ชฉ์ ๊ต์ ๊ณผ๋ชฉ์ด ๋ฌ๋ผ์ง๋ 22๋ ๋ ์ดํ์ ์๊ฐํ ๊ฒฝ์ฐ '๊ต์' ๊ณผ๋ชฉ์ ์ถฉ์กฑ์ํค์ง ๋ชปํ๋๊ฒ์ผ๋ก ๊ณ์ฐ๋์์ต๋๋ค. (๊ธฐ์กด์ ์ฝ๋๋ ์๊ฐํ ๋ ๋์ GonghakCourse ์ ํ)โ๏ธPR ์ฒดํฌ๋ฆฌ์คํธ