From 973082901cc16cb8dabbda9ed98f56900f5112cb Mon Sep 17 00:00:00 2001 From: dldmsql Date: Mon, 4 Nov 2024 23:32:54 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20non-null=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../domain/board/controller/dto/BoardCreateRequest.kt | 2 +- .../domain/board/repository/BoardJooqRepositoryImpl.kt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/kotlin/com/ddd/sonnypolabobe/domain/board/controller/dto/BoardCreateRequest.kt b/src/main/kotlin/com/ddd/sonnypolabobe/domain/board/controller/dto/BoardCreateRequest.kt index 50e6d98..0859688 100644 --- a/src/main/kotlin/com/ddd/sonnypolabobe/domain/board/controller/dto/BoardCreateRequest.kt +++ b/src/main/kotlin/com/ddd/sonnypolabobe/domain/board/controller/dto/BoardCreateRequest.kt @@ -13,5 +13,5 @@ data class BoardCreateRequest( @field:Schema(description = "작성자 아이디", example = "null", required = false) var userId: Long? = null, @field:Schema(description = "보드 옵션 - key 값으로 THEMA를 주세요. value로는 프론트에서 지정한 숫자 혹은 식별값을 주세요.", example = "{\"THEMA\":\"value3\"}") - val options : Map + val options : Map? ) diff --git a/src/main/kotlin/com/ddd/sonnypolabobe/domain/board/repository/BoardJooqRepositoryImpl.kt b/src/main/kotlin/com/ddd/sonnypolabobe/domain/board/repository/BoardJooqRepositoryImpl.kt index 81b9d6c..7ec3a6c 100644 --- a/src/main/kotlin/com/ddd/sonnypolabobe/domain/board/repository/BoardJooqRepositoryImpl.kt +++ b/src/main/kotlin/com/ddd/sonnypolabobe/domain/board/repository/BoardJooqRepositoryImpl.kt @@ -36,7 +36,7 @@ class BoardJooqRepositoryImpl( this.yn = 1 this.activeyn = 1 this.userId = request.userId - this.options = request.options.let { ObjectMapper().writeValueAsString(it) } + this.options = request.options?.let { ObjectMapper().writeValueAsString(it) } } val result = this.dslContext.insertInto(jBoard) .set(insertValue)