-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* fix : postgresql 방식으로 sql문 변경 * fix : response 필요한 데이터만 보내도록 수정 * feat : views로 조회수 기능 추가 * feat : 카테고리별 검색기능 추가 * fix : 전체/ 카테고리 접근 분리 * fix : query 어노테이션 제거 * fix : merge conflict 해결 * fix : sql문 삭제 무결성 유지 * fix : sql 무결성 해결
- Loading branch information
1 parent
4c7d3e5
commit 4d57dc3
Showing
18 changed files
with
398 additions
and
141 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
38 changes: 25 additions & 13 deletions
38
src/main/kotlin/com/example/daitssuapi/domain/notice/controller/NoticeController.kt
This file contains 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
33 changes: 33 additions & 0 deletions
33
src/main/kotlin/com/example/daitssuapi/domain/notice/dto/FunSystemPageResponse.kt
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
package com.example.daitssuapi.domain.notice.dto | ||
|
||
import com.example.daitssuapi.common.enums.FunSystemCategory | ||
import com.example.daitssuapi.domain.notice.model.entity.FunSystem | ||
import java.time.LocalDateTime | ||
|
||
data class FunSystemPageResponse ( | ||
val id: Long?, | ||
val title: String, | ||
val content: String, | ||
val category: FunSystemCategory?, | ||
val imageUrl: String?, | ||
val url: String?, | ||
val createdAt: LocalDateTime, | ||
val updatedAt: LocalDateTime, | ||
val views : Int, | ||
){ | ||
companion object { | ||
fun fromFunSystem(funSystem: FunSystem): FunSystemPageResponse { | ||
return FunSystemPageResponse( | ||
id = funSystem.id, | ||
title = funSystem.title, | ||
content = funSystem.content, | ||
category = funSystem.category, | ||
imageUrl = funSystem.imageUrl, | ||
url = funSystem.url, | ||
createdAt = funSystem.createdAt, | ||
updatedAt = funSystem.updatedAt, | ||
views = funSystem.views, | ||
) | ||
} | ||
} | ||
} |
This file contains 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
35 changes: 35 additions & 0 deletions
35
src/main/kotlin/com/example/daitssuapi/domain/notice/dto/NoticePageResponse.kt
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
package com.example.daitssuapi.domain.notice.dto | ||
|
||
import com.example.daitssuapi.common.enums.NoticeCategory | ||
import com.example.daitssuapi.domain.notice.model.entity.Notice | ||
import java.time.LocalDateTime | ||
|
||
data class NoticePageResponse( | ||
val id: Long?, | ||
val title: String, | ||
val departmentId: Int, | ||
val content: String, | ||
val category: NoticeCategory?, | ||
val imageUrl: String?, | ||
val fileUrl: String?, | ||
val createdAt: LocalDateTime, | ||
val updatedAt: LocalDateTime, | ||
val views : Int, | ||
) { | ||
companion object { | ||
fun fromNotice(notice: Notice): NoticePageResponse { | ||
return NoticePageResponse( | ||
id = notice.id, | ||
title = notice.title, | ||
departmentId = notice.departmentId, | ||
content = notice.content, | ||
category = notice.category, | ||
imageUrl = notice.imageUrl, | ||
fileUrl = notice.fileUrl, | ||
createdAt = notice.createdAt, | ||
updatedAt = notice.updatedAt, | ||
views = notice.views, | ||
) | ||
} | ||
} | ||
} |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.