Conversation
Contributor
|
|
SeonghaeJo
reviewed
Jan 27, 2025
| try { | ||
| val currentCourseNumber = row.getCell(7).stringCellValue | ||
| val oldCategory = row.getCell(1).stringCellValue | ||
| if (currentCourseNumber.isBlank() || oldCategory.isBlank()) { |
Contributor
There was a problem hiding this comment.
위에 isNotBlank로 필터링하는 로직이 있어서 로직이 중복되는 것 같아요.
아래 filter 부분은 없어도 될 것 같아요
.filter { row ->
row.getCell(7).stringCellValue.isNotBlank() && row.getCell(1).stringCellValue.isNotBlank()
}
SeonghaeJo
approved these changes
Jan 27, 2025
Member
Author
|
categoryPre2025로 이름 바꾸고 리뷰해주신 내용 수정했습니다 |
Hank-Choi
reviewed
Feb 3, 2025
| ) : SugangSnuSyncService { | ||
| override suspend fun updateCoursebook(coursebook: Coursebook): List<UserLectureSyncResult> { | ||
| val newLectures = sugangSnuFetchService.getSugangSnuLectures(coursebook.year, coursebook.semester) | ||
| val courseNumberCategoryPre2025Map = categoryPre2025FetchService.getCategoriesPre2025() |
Member
There was a problem hiding this comment.
sync쪽에 들어있는것보다 sugangSnuFetchService 에 들어있는게 어떨지?
Comment on lines
+11
to
+36
| @Component | ||
| class CategoryPre2025Repository( | ||
| private val googleDocsApi: GoogleDocsApi, | ||
| ) { | ||
| companion object { | ||
| const val SPREADSHEET_PATH = "/spreadsheets/d" | ||
| const val SPREADSHEET_KEY = "/1Ok2gu7rW1VYlKmC_zSjNmcljef0kstm19P9zJ_5s_QA" | ||
| } | ||
|
|
||
| suspend fun fetchCategoriesPre2025(): PooledDataBuffer = | ||
| googleDocsApi.get().uri { builder -> | ||
| builder.run { | ||
| path(SPREADSHEET_PATH) | ||
| path(SPREADSHEET_KEY) | ||
| path("/export") | ||
| queryParam("format", "xlsx") | ||
| build() | ||
| } | ||
| }.accept(MediaType.TEXT_HTML).awaitExchange { | ||
| if (it.statusCode().is2xxSuccessful) { | ||
| it.awaitBody() | ||
| } else { | ||
| throw it.createExceptionAndAwait() | ||
| } | ||
| } | ||
| } |
Member
There was a problem hiding this comment.
이거 그냥 엑셀로 다운받아서 resources 폴더에 두는건 어떨까요?
Member
Author
There was a problem hiding this comment.
컴공 홈페이지에 있는 링크를 가져온 거라 변경사항 있을때 그쪽에서 바꾸면 반영되게 하려고 이렇게 했어요
변경이 아마도 안될거 같긴 해요
혹시 이게 내려가거나 하더라도 다시 개인이 전체 공개로 올려두면 사라질 일은 없어서 저는 괜찮을거 같아요
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
25학년도부터 교양 분류가 변경되면서 기존 재학생들이 들어야 하는 교양 찾기가 어려워져서 제안된 기능입니다
수강스누 배치에 같이 돌아가게 되어 있고 엑셀 파일은 컴공 홈페이지에서 제공하는 구글 드라이브 링크로 받아오고 있어요