Skip to content

Conversation

@gmltn9233
Copy link
Contributor

๐Ÿ”ง์—ฐ๊ฒฐ๋œ ์ด์Šˆ

๐Ÿ› ๏ธ์ž‘์—… ๋‚ด์šฉ

  • findUserCompletedCourses์˜ ์ฟผ๋ฆฌ๋ฌธ์„ ์ž์‹ ์˜ ์ž…ํ•™๋…„๋„ ๊ธฐ์ค€์˜ ๊ณผ๋ชฉ์„ ๋ถˆ๋Ÿฌ์˜ค๋„๋ก ๋ฆฌํŒฉํ† ๋ง

๐Ÿคทโ€โ™‚๏ธPR์ด ํ•„์š”ํ•œ ์ด์œ 

  • ์ด์ˆ˜ํ•˜๋Š” ๊ณผ๋ชฉ์€ ์ž…ํ•™๋…„๋„ ๊ธฐ์ค€์„ ๋”ฐ๋ผ์•ผ ํ•˜๋Š”๋ฐ, ์ด์ „ ๋ฆฌํŒฉํ† ๋ง(refactor: GonghakDaoย #60) ์—์„œ ์ด๊ฐ€ ๋ฐ˜์˜๋˜์ง€ ์•Š์•˜์Šต๋‹ˆ๋‹ค.

์˜ˆ๋ฅผ ๋“ค์–ด ๋ฐ์ดํ„ฐ์‚ฌ์ด์–ธ์Šค ํ•™๊ณผ์˜ 19๋…„๋„ ๊ต์–‘์€ `ERP' , 'ELP'๋ฅผ ์ˆ˜๊ฐ•ํ•ด์•ผํ•˜๋Š”๋ฐ, ํ•ด๋‹น ๊ณผ๋ชฉ์„ ๊ต์–‘ ๊ณผ๋ชฉ์ด ๋‹ฌ๋ผ์ง€๋Š” 22๋…„๋„ ์ดํ›„์— ์ˆ˜๊ฐ•ํ•  ๊ฒฝ์šฐ '๊ต์–‘' ๊ณผ๋ชฉ์„ ์ถฉ์กฑ์‹œํ‚ค์ง€ ๋ชปํ•˜๋Š”๊ฒƒ์œผ๋กœ ๊ณ„์‚ฐ๋˜์—ˆ์Šต๋‹ˆ๋‹ค. (๊ธฐ์กด์˜ ์ฝ”๋“œ๋Š” ์ˆ˜๊ฐ•ํ•œ ๋…„๋„์˜ GonghakCourse ์„ ํƒ)

โœ”๏ธPR ์ฒดํฌ๋ฆฌ์ŠคํŠธ

  • ํ•„์š”ํ•œ ํ…Œ์ŠคํŠธ๋ฅผ ์ž‘์„ฑํ–ˆ๋Š”๊ฐ€?
  • ๋‹ค๋ฅธ ์ฝ”๋“œ๋ฅผ ๊นจ๋œจ๋ฆฌ์ง€ ์•Š์•˜๋Š”๊ฐ€?
  • ์—ฐ๊ฒฐ๋œ ์ด์Šˆ ์™ธ์— ๋‹ค๋ฅธ ์ด์Šˆ๋ฅผ ํ•ด๊ฒฐํ•œ ์ฝ”๋“œ๊ฐ€ ๋‹ด๊ฒจ์žˆ๋Š”๊ฐ€?

gmltn9233 and others added 9 commits August 18, 2024 15:29
findStandard ๋ฉ”์„œ๋“œ๋ฅผ ์ตœ์‹ ๋…„๋„ ๊ธฐ์ค€์„ ๋ถˆ๋Ÿฌ์˜ค๋„๋ก ๋ณ€๊ฒฝํ•˜๊ณ  ์—ฐ๊ด€๋œ ์‚ฌํ•ญ๋“ค์„ ๋ณ€๊ฒฝ์‚ฌํ•ญ์— ๋งž๊ฒŒ ๋ณ€๊ฒฝํ•˜์˜€์Šต๋‹ˆ๋‹ค.
์ง๊ด€์ ์ธ ์ดํ•ด๋ฅผ ์œ„ํ•ด YEAR -> LATEST_YAER ๋ณ€๊ฒฝ
ํšŒ์›๊ฐ€์ž… ํ™”๋ฉด์—์„œ ์„ ํƒํ• ์ˆ˜ ์žˆ๋Š” ํ•™๊ณผ์— '์†Œํ”„ํŠธ์›จ์–ดํ•™๊ณผ' , '๋ฐ์ดํ„ฐ ์‚ฌ์ด์–ธ์Šคํ•™๊ณผ' ์ถ”๊ฐ€
์ถ”๊ฐ€: ์†Œํ”„ํŠธ์›จ์–ดํ•™๊ณผ, ๋ฐ์ดํ„ฐ์‚ฌ์ด์–ธ์Šคํ•™๊ณผ, ํ…Œ์ŠคํŠธ ์œ ์ €(admin 3๋ช…), 4๊ฐœ ํ•™๊ณผ 24๋…„๋„ abeek
์‚ญ์ œ: ๊ธฐ์กด ํ…Œ์ŠคํŠธ ์œ ์ €, ํ…Œ์ŠคํŠธ ๋”๋ฏธ ๋ฐ์ดํ„ฐ
1. ์šด์˜์šฉ DB์— ๋™์ผํ•œ DB ํ™˜๊ฒฝ ๊ตฌ์„ฑ
2. ๊ณผ๋ชฉ๋ช… ๋„์–ด์“ฐ๊ธฐ ์˜ค๋ฅ˜ ํ•ด๊ฒฐ์„ ์œ„ํ•œ CoursesDao.findByNameIgnoreSpaces ๋ฉ”์„œ๋“œ ์ถ”๊ฐ€
3. MajorsDao.findById ๋ฉ”์„œ๋“œ ์ถ”๊ฐ€
1. ๋„์›Œ์“ฐ๊ธฐ -> ๋„์–ด์“ฐ๊ธฐ
2. Course.csv -> course.csv
์ธ์ฆ์š”๊ฑด ์„ธ๋ถ€ํ•ญ๋ชฉ์ด ์ž์‹ ์˜ ์ž…ํ•™๋…„๋„๋ฅผ ๋”ฐ๋ฅด๋„๋ก ๋ฆฌํŒฉํ† ๋ง
@gmltn9233 gmltn9233 added ๐Ÿ”จ ๋ฆฌํŒฉํ† ๋ง ๋ฆฌํŒฉํ† ๋ง ์„œ๋น„์Šค ์„œ๋น„์Šค ๋กœ์ง ๊ด€๋ จ ์ด์Šˆ labels Aug 24, 2024
@gmltn9233 gmltn9233 self-assigned this Aug 24, 2024
@gmltn9233 gmltn9233 changed the title Refactor gonghak courses dao refactor: gonghakcoursesdao Aug 24, 2024
@whxogus215
Copy link
Contributor

ํ•ด๋‹น 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);
Copy link
Contributor

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);
Copy link
Contributor

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๋„ ์ƒ์ˆ˜๋กœ ๋นผ๋‚ด์–ด ์ด๊ฒƒ์ด ์‚ฌ์šฉ์ž์˜ ์ž…ํ•™๋…„๋„์ž„์„ ๋‚˜ํƒ€๋‚ผ ์ˆ˜ ์žˆ๋Š” ๋ณ€์ˆ˜๋ช…์„ ๋ถ€์—ฌํ•˜๋ฉด ์ฝ”๋“œ๋ฅผ ์ดํ•ดํ•จ์— ์žˆ์–ด์„œ ๋„์›€์ด ๋  ๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค!

Copy link
Contributor Author

@gmltn9233 gmltn9233 Aug 25, 2024

Choose a reason for hiding this comment

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

studentId๊ฐ€ ๋ณ€์ˆ˜๋ผ studentId / DIVIDER ๋ฅผ ์ƒ์ˆ˜๋กœ ๋งŒ๋“ค์ˆ˜ ์—†์ง€ ์•Š๋‚˜์š”?? ์•„๋‹ˆ๋ฉด ์ž…ํ•™๋…„๋„๋ฅผ ๋ถˆ๋Ÿฌ์˜จ๋‹ค๋Š” ์˜๋ฏธ์˜ ๋ฉ”์„œ๋“œ๋ฅผ ์ถ”๊ฐ€ํ•˜์—ฌ ๊ฐ€๋…์„ฑ์„ ๋†’์ผ ์ˆ˜ ์žˆ์„๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค.

Copy link
Contributor

Choose a reason for hiding this comment

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

์•„ ๋งž๋„ค์š” 'studentId'๊ฐ€ ๋ณ€์ˆ˜๋ผ๋Š”๊ฑธ ์ƒ๊ฐ ๋ชปํ–ˆ๋„ค์š”ใ…‹ใ…‹ ์ง€๊ธˆ์ฒ˜๋Ÿผ ๋†”๋‘ฌ๋„ ๊ดœ์ฐฎ์„ ๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค!

@whxogus215 whxogus215 merged commit ca7d0c8 into develop Aug 26, 2024
@gmltn9233 gmltn9233 deleted the refactor-GonghakCoursesDao 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

๐Ÿ”จ ๋ฆฌํŒฉํ† ๋ง ๋ฆฌํŒฉํ† ๋ง ์„œ๋น„์Šค ์„œ๋น„์Šค ๋กœ์ง ๊ด€๋ จ ์ด์Šˆ

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants