-
Notifications
You must be signed in to change notification settings - Fork 1
π₯fix/KIKI-73 : PR 리뷰λ°μνμ¬ μμ #68
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
π₯fix/KIKI-73 : PR 리뷰λ°μνμ¬ μμ #68
The head ref may contain hidden characters: "feat/custom/KIKI-73-BE-\uCD94\uCC9C-\uAE30\uB2A5-\uAD6C\uD604"
Conversation
- λ³κ²½λ ν΄λ κ΅¬μ‘°λ‘ μμ - μΆμ² APIμ user λΆλ§ν¬ λ°μ - adapterμμ query λ°©μ ν΅μΌ
Test Results34 testsβββ34 β
ββ6s β±οΈ Results for commit ef09f64. |
Walkthrough
Sequence Diagram(s)sequenceDiagram
autonumber
participant C as RecommendationController
participant S as RecommendationService
participant R as RecommendationPort
participant B as BookmarkPort
Note over C,S: GET /recommendations/similar
C->>S: getSimilarProducts(userId, productId)
S->>R: loadSimilarProducts(productId)
R-->>S: List<Product>
loop for each Product
S->>B: checkBookmarkByUserIdAndProductId(userId, product.id)
B-->>S: boolean likedByMe
S-->>S: KeyboardRecommendationResponse.from(product, likedByMe)
end
S-->>C: List<KeyboardRecommendationResponse>
C-->>C: ApiResponse.ok(list)
C-->>Client: ApiResponse<List<KeyboardRecommendationResponse>>
sequenceDiagram
autonumber
participant A as ControllerLoggingAspect
participant Ctrl as Web Controller (*..adapter.in.web..*)
participant LA as LoggingAspect
participant Svc as Application Service (*..application.service.*Service.*)
Note over A,Ctrl: μμ² μ§μ
μ 컨νΈλ‘€λ¬ λ‘κΉ
Client->>Ctrl: HTTP Request
activate A
A-->>A: μ¬μ©μ/컨νΈλ‘€λ¬/λ©μλ/URI μμ§ λ° λ‘κ·Έ
deactivate A
Note over LA,Svc: μλΉμ€ κ³μΈ΅ κ³΅ν΅ λ‘κΉ
(μ§μ
/λ°ν/μμΈ)
Ctrl->>Svc: serviceMethod(...)
activate LA
LA-->>LA: before λ‘κ·Έ
Svc-->>LA: λ°ν or μμΈ
alt μ μ λ°ν
LA-->>LA: afterReturning λ‘κ·Έ
else μμΈ
LA-->>LA: afterThrowing λ‘κ·Έ
end
deactivate LA
sequenceDiagram
autonumber
participant RC as RecommendKeyboardAdapter
participant Mongo as MongoDB
Note over RC: ν€λ³΄λ μΆμ² κ²μ 쑰건 ꡬμ±
RC-->>RC: andCriterias μμ§ (keyPressure, layout, soundDampener, rgb)
RC-->>RC: priceBounds 쑰립 (min/max)
RC-->>RC: options.elemMatch(andOperator(priceBounds...))
RC-->>RC: layout νΉμμ²λ¦¬(ERGONOMIC/egonomic, SIMPLE: LP|desc 'lp')
RC-->>Mongo: query.addCriteria(andOperator(andCriterias...))
Mongo-->>RC: κ²°κ³Ό List<ProductDocument>
Estimated code review effortπ― 4 (Complex) | β±οΈ ~60 minutes Tip π Remote MCP (Model Context Protocol) integration is now available!Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats. β¨ Finishing Touches
π§ͺ Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. πͺ§ TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
CodeRabbit Configuration File (
|
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.
Actionable comments posted: 0
Caution
Some comments are outside the diff and canβt be posted inline due to platform limitations.
β οΈ Outside diff range comments (4)
src/main/java/site/kikihi/custom/global/logging/LoggingAspect.java (1)
36-41: μμΈ λ‘κΉ μ μ€ννΈλ μ΄μ€κ° λλ½λ©λλ€.throwingνλΌλ―Έν°λ‘ μμ νμΈμ.νμ¬
@AfterThrowingκ° μμΈ κ°μ²΄λ₯Ό λ°μ§ μμ μμΈ λΆμμ΄ μ΄λ ΅μ΅λλ€. λ‘κ·Έ λ 벨λerrorκ° μ μ ν©λλ€.μ μ© diff:
- @AfterThrowing(pointcut = "applicationLayer()") - public void logException(JoinPoint joinPoint) { - log.info("[μλΉμ€ λ‘κΉ ] μμΈ λ°μ: {}.{}", - joinPoint.getSignature().getDeclaringTypeName(), - joinPoint.getSignature().getName()); - } + @AfterThrowing(pointcut = "applicationLayer()", throwing = "ex") + public void logException(JoinPoint joinPoint, Throwable ex) { + log.error("[μλΉμ€ λ‘κΉ ] μμΈ λ°μ: {}.{} - {}", + joinPoint.getSignature().getDeclaringTypeName(), + joinPoint.getSignature().getName(), + ex.toString(), + ex); + }src/main/java/site/kikihi/custom/platform/adapter/in/web/dto/request/product/KeyboardOptions.java (1)
57-71: Layout enum μ€ν(βegonomicβ) μμ λ° @JsonCreator μΆκ°
- μ μ Jackson μ€μ (READ_ENUMS_USING_TO_STRING, ACCEPT_CASE_INSENSITIVE_ENUMS λ±) λ―Έλ°κ²¬ β ν΄λΌμ΄μΈνΈκ° βergonomicβ μ μ‘ μ μμ§λ ¬ν μ€ν¨ μν
- μλ diff μ μ© ν, Size/KeyPressure/SwitchType/SoundDampener/RGB λ± μ μ¬ enumμλ λμΌ ν¨ν΄ νμ₯ μ μ© κΆμ₯
@Getter @RequiredArgsConstructor @Schema(name = "[μμ²][μν] λ μ΄μμ(Layout) Enum", description = "λ μ΄μμ μ΅μ ") public enum Layout { - @Schema(description = "μΈμ²΄κ³΅νμ (μ€ν μ€μ»¬μ³2)", example = "egonomic") - ERGONOMIC("egonomic"), + @Schema(description = "μΈμ²΄κ³΅νμ (μ€ν μ€μ»¬μ³2)", example = "ergonomic") + ERGONOMIC("ergonomic"), @Schema(description = "μ¬ννκ³ κΉλν (low νλ‘νμΌ)", example = "simple") SIMPLE("simple"); private final String value; @JsonValue public String getValue() { return value; } + @com.fasterxml.jackson.annotation.JsonCreator + public static Layout from(String value) { + if (value == null) return null; + String v = value.trim().toLowerCase(); + return switch (v) { + case "ergonomic", "egonomic" -> ERGONOMIC; + case "simple" -> SIMPLE; + default -> throw new IllegalArgumentException("Unknown layout: " + value); + }; + } }src/main/java/site/kikihi/custom/platform/adapter/in/web/dto/request/product/KeyboardRecommendationRequest.java (1)
12-35: νλ μ ν¨μ± κ²μ¦ μΆκ° λ° Layout μμ μ€ν μμ νμ.
required = trueλ§μΌλ‘λ Bean Validationμ΄ λμνμ§ μμ΅λλ€.@NotNull, κ°κ²© λ²μ κ²μ¦ λ±μ μΆκ°νμΈμ.- Layout μμ
"egonomic"μ€νλ₯Ό"ergonomic"μΌλ‘ μ μ νμΈμ(μμ§λ ¬νλKeyboardOptions.Layout.fromλ‘ νΈν).μ μ© diff:
- @Schema(description = "ν€λ³΄λ λ°°μ΄(Size) μ΅μ ", example = "tenkeyless", required = true) - private KeyboardOptions.Size size; + @Schema(description = "ν€λ³΄λ λ°°μ΄(Size) μ΅μ ", example = "tenkeyless", required = true) + @jakarta.validation.constraints.NotNull + private KeyboardOptions.Size size; @Schema(description = "ν€μ(Key Pressure) μ΅μ ", example = "light", required = true) - private KeyboardOptions.KeyPressure keyPressure; + @jakarta.validation.constraints.NotNull + private KeyboardOptions.KeyPressure keyPressure; - @Schema(description = "λ μ΄μμ μ’ λ₯(Layout) μ΅μ ", example = "egonomic", required = true) - private KeyboardOptions.Layout layout; + @Schema(description = "λ μ΄μμ μ’ λ₯(Layout) μ΅μ ", example = "ergonomic", required = true) + @jakarta.validation.constraints.NotNull + private KeyboardOptions.Layout layout; @Schema(description = "μ€μμΉ μ’ λ₯(Switch Type) μ΅μ ", example = "silent", required = true) - private KeyboardOptions.SwitchType switchType; + @jakarta.validation.constraints.NotNull + private KeyboardOptions.SwitchType switchType; @Schema(description = "ν‘μμ¬(Sound Dampener) μ μ© μ¬λΆ", example = "β", required = true) - private KeyboardOptions.SoundDampener soundDampener; + @jakarta.validation.constraints.NotNull + private KeyboardOptions.SoundDampener soundDampener; @Schema(description = "RGB μ μ© μ¬λΆ", example = "β", required = true) - private KeyboardOptions.RGB rgb; + @jakarta.validation.constraints.NotNull + private KeyboardOptions.RGB rgb; @Schema(description = "μ΅μ κ°κ²© (λ¨μ: μ)", example = "0", required = true) - private int minPrice; + @jakarta.validation.constraints.PositiveOrZero + private int minPrice; @Schema(description = "μ΅λ κ°κ²© (λ¨μ: μ)", example = "200000", required = true) - private int maxPrice; + @jakarta.validation.constraints.PositiveOrZero + private int maxPrice;μΆκ°μ μΌλ‘, κ°κ²© λ²μ μ ν¨μ± 보μ₯μ μν΄ ν΄λμ€ λ΄λΆμ λ€μ λ©μλ μΆκ°λ₯Ό κΆμ₯ν©λλ€:
@jakarta.validation.constraints.AssertTrue(message = "maxPriceλ minPriceλ³΄λ€ ν¬κ±°λ κ°μμΌ ν©λλ€.") public boolean isPriceRangeValid() { return maxPrice >= minPrice; }νμ import:
import jakarta.validation.constraints.*;src/main/java/site/kikihi/custom/platform/adapter/out/RecommendKeyboardAdapter.java (1)
214-214: λ§€μ§ λλ²λ₯Ό μμλ‘ μ μ νμμΆμ² μν μ μ νκ° 6μ΄ νλμ½λ©λμ΄ μμ΅λλ€. μ μ§λ³΄μμ±μ μν΄ μμλ‘ λΆλ¦¬νλ κ²μ΄ μ’μ΅λλ€.
ν΄λμ€ μλ¨μ μμ μ μ:
+private static final int MAX_SIMILAR_PRODUCTS = 6; + // ν€λ³΄λ μΆμ² λ‘μ§ @Overrideμ¬μ© λΆλΆ μμ :
-if (recommended.size() > 6) break; +if (recommended.size() > MAX_SIMILAR_PRODUCTS) break;-if (recommended.size() > 6) break; +if (recommended.size() > MAX_SIMILAR_PRODUCTS) break;Also applies to: 227-227
π§Ή Nitpick comments (6)
src/main/java/site/kikihi/custom/global/logging/ControllerLoggingAspect.java (1)
24-25: @RestController/@controller μ΄λ Έν μ΄μ κΈ°λ° ν¬μΈνΈμ»·μΌλ‘ μ ν
ν¨ν€μ§ μ΄λ μ λ‘κΉ λλ½ λ°©μ§λ₯Ό μν΄ annotation κΈ°λ°μΌλ‘ μΌλ°ννμΈμ.μ μ© μμ:
- @Pointcut("execution(* site.kikihi.custom.platform.adapter/in/web..*.*(..))") + @Pointcut("within(@org.springframework.web.bind.annotation.RestController *) || within(@org.springframework.stereotype.Controller *)") private void controllerPointcut() {}src/main/java/site/kikihi/custom/global/logging/LoggingAspect.java (1)
16-18: μλΉμ€ ν¬μΈνΈμ»·μ λ€μ΄λ°/ν¨ν€μ§ κ²°ν©μμ ννΌνμΈμ.
*Service.*λ€μ΄λ°/κ²½λ‘μ μμ‘΄νλ©΄ 리ν©ν λ§ λ μ½κ² μλ μ§μ μ΄ μκΉλλ€.@Serviceμ λ Έν μ΄μ κΈ°λ°μΌλ‘ μ νμ κΆμ₯ν©λλ€.μ μ© diff:
- @Pointcut("execution(* site.kikihi.custom.platform.application.service.*Service.*(..))") + @Pointcut("within(@org.springframework.stereotype.Service *) && within(site.kikihi.custom..*)") private void applicationLayer() {src/main/java/site/kikihi/custom/platform/adapter/out/mongo/product/ProductDocument.java (1)
49-52:specTableμ κΈ°λ³Έκ° μ΄κΈ°νλ μ μ ν©λλ€.
@Builder.Defaultλ‘ NPEλ₯Ό μλ°©ν©λλ€. μ¬μν μ€νμΌ μ μ: FQCN λμHashMapimport μ¬μ©.μ μ© diff:
- private Map<String, Object> specTable = new java.util.HashMap<>(); + private Map<String, Object> specTable = new HashMap<>();μΆκ° import:
import java.util.HashMap;src/main/java/site/kikihi/custom/platform/adapter/out/RecommendKeyboardAdapter.java (1)
63-69: μ€ν μ²λ¦¬λ μνμ ¨μΌλ μ κ·ν λ°©λ² κ°μ νμ'egonomic'μ΄λΌλ μ€νλ₯Ό μ²λ¦¬νλ κ²μ μ’μΌλ, νλμ½λ©λ μ€ν μ²λ¦¬λ³΄λ€λ λ μ μ°ν μ κ·Όμ΄ νμν©λλ€.
λμλ¬Έμ κ΅¬λΆ μμ΄ μ²λ¦¬νλλ‘ κ°μ :
-String val = layout.trim(); -boolean ergonomic = "ERGONOMIC".equalsIgnoreCase(val) || "egonomic".equalsIgnoreCase(val); +String val = layout.trim().toUpperCase(); +boolean ergonomic = val.equals("ERGONOMIC") || val.equals("EGONOMIC");λλ enum νμ μ νμ©ν λ μμ ν μ²λ¦¬:
-String val = layout.trim(); -boolean ergonomic = "ERGONOMIC".equalsIgnoreCase(val) || "egonomic".equalsIgnoreCase(val); +String val = layout.trim(); +boolean ergonomic = KeyboardOptions.Layout.ERGONOMIC.getValue().equalsIgnoreCase(val) + || "egonomic".equalsIgnoreCase(val);src/main/java/site/kikihi/custom/platform/application/service/RecommendationService.java (2)
136-159: μ½λ μ€λ³΅ μ κ±° κ³ λ €
getTutorialKeyboardRecommendationκ³ΌgetSimilarProductsλ©μλμμ λμΌν λΆλ§ν¬ νμΈ λ° λ§€ν λ‘μ§μ΄ λ°λ³΅λ©λλ€.κ³΅ν΅ ν¬νΌ λ©μλλ‘ μΆμΆ:
+private List<KeyboardRecommendationResponse> mapToResponseWithBookmarks( + List<Product> products, UUID userId) { + return products.stream() + .map(product -> { + boolean likedByMe = userId != null && + bookmarkPort.checkBookmarkByUserIdAndProductId(userId, product.getId()); + return KeyboardRecommendationResponse.from(product, likedByMe); + }) + .collect(Collectors.toList()); +}κ·Έλ¦¬κ³ λ λ©μλμμ μ¬μ¬μ©:
-return documents.stream() - .map(product -> { - boolean likedByMe = bookmarkPort.checkBookmarkByUserIdAndProductId(userId, product.getId()); - return KeyboardRecommendationResponse.from(product, likedByMe); - }) - .collect(Collectors.toList()); +return mapToResponseWithBookmarks(documents, userId);
138-145: μ£Όμ μ²λ¦¬λ μ½λ μ κ±° νμμ¬μ©νμ§ μλ μ£Όμ μ²λ¦¬λ μ½λλ κ°λ μ±μ ν΄μΉκ³ νΌλμ μ€ μ μμ΅λλ€.
μ£Όμ μ²λ¦¬λ μ½λ μ κ±°:
-/// μ μ κ° μλ€λ©΄ 체ν¬, μλ€λ©΄ λ°λ‘ μν μ‘°ν -// if (userId != null) { -// /// 컀μ€ν μ μ μνλ€λ©΄, λΉμ·ν νΉμ±μ μνλ€μ μΆμ² -// Optional<CustomKeyboard> customKeyboard = customPort.loadCustomKeyboardByUserId(userId); -// -// if (customKeyboard.isPresent()) { -// return recommendForCustomUser(customKeyboard.get()); -// } -// } -
π Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
π‘ Knowledge Base configuration:
- MCP integration is disabled by default for public repositories
- Jira integration is disabled by default for public repositories
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
π Files selected for processing (10)
src/main/java/site/kikihi/custom/global/logging/ControllerLoggingAspect.java(1 hunks)src/main/java/site/kikihi/custom/global/logging/LoggingAspect.java(1 hunks)src/main/java/site/kikihi/custom/platform/adapter/in/web/RecommendationController.java(1 hunks)src/main/java/site/kikihi/custom/platform/adapter/in/web/dto/request/product/KeyboardOptions.java(1 hunks)src/main/java/site/kikihi/custom/platform/adapter/in/web/dto/request/product/KeyboardRecommendationRequest.java(1 hunks)src/main/java/site/kikihi/custom/platform/adapter/in/web/dto/response/product/KeyboardRecommendationResponse.java(2 hunks)src/main/java/site/kikihi/custom/platform/adapter/out/RecommendKeyboardAdapter.java(4 hunks)src/main/java/site/kikihi/custom/platform/adapter/out/mongo/product/ProductDocument.java(1 hunks)src/main/java/site/kikihi/custom/platform/application/in/recommendation/RecommendationUseCase.java(1 hunks)src/main/java/site/kikihi/custom/platform/application/service/RecommendationService.java(4 hunks)
π§° Additional context used
𧬠Code graph analysis (8)
src/main/java/site/kikihi/custom/platform/adapter/in/web/dto/request/product/KeyboardOptions.java (1)
src/main/java/site/kikihi/custom/platform/adapter/in/web/converter/KeyboardOptionsConverter.java (2)
mapLayoutToDescription(53-59)KeyboardOptionsConverter(9-69)
src/main/java/site/kikihi/custom/platform/application/in/recommendation/RecommendationUseCase.java (2)
src/main/java/site/kikihi/custom/platform/application/out/recommend/RecommendKeyboardPort.java (2)
getSimilarProducts(46-46)RecommendKeyboardPort(9-47)src/main/java/site/kikihi/custom/platform/adapter/in/web/swagger/RecommendControllerSpec.java (1)
Operation(47-54)
src/main/java/site/kikihi/custom/platform/adapter/out/RecommendKeyboardAdapter.java (1)
src/main/java/site/kikihi/custom/platform/application/out/recommend/RecommendKeyboardPort.java (2)
filterAndRecommendKeyboards(26-36)RecommendKeyboardPort(9-47)
src/main/java/site/kikihi/custom/platform/adapter/in/web/dto/request/product/KeyboardRecommendationRequest.java (2)
src/main/java/site/kikihi/custom/platform/adapter/in/web/swagger/RecommendControllerSpec.java (2)
Tag(17-57)Operation(35-42)src/main/java/site/kikihi/custom/platform/adapter/in/web/converter/KeyboardOptionsConverter.java (1)
mapSizeToDescription(12-19)
src/main/java/site/kikihi/custom/platform/application/service/RecommendationService.java (1)
src/main/java/site/kikihi/custom/platform/application/out/recommend/RecommendKeyboardPort.java (3)
RecommendKeyboardPort(9-47)getSimilarProducts(46-46)filterAndRecommendKeyboards(26-36)
src/main/java/site/kikihi/custom/platform/adapter/in/web/dto/response/product/KeyboardRecommendationResponse.java (1)
src/main/java/site/kikihi/custom/platform/application/out/recommend/RecommendKeyboardPort.java (1)
filterAndRecommendKeyboards(26-36)
src/main/java/site/kikihi/custom/platform/adapter/in/web/RecommendationController.java (2)
src/main/java/site/kikihi/custom/platform/application/out/recommend/RecommendKeyboardPort.java (1)
getSimilarProducts(46-46)src/main/java/site/kikihi/custom/platform/adapter/in/web/swagger/RecommendControllerSpec.java (1)
Operation(47-54)
src/main/java/site/kikihi/custom/platform/adapter/out/mongo/product/ProductDocument.java (2)
src/main/java/site/kikihi/custom/platform/adapter/out/elasticSearch/ProductESDocument.java (3)
Getter(22-99)from(65-81)toDomain(84-98)src/test/java/site/kikihi/custom/platform/domain/product/ProductFixtures.java (3)
createProduct(34-56)ProductFixtures(7-107)fakeProduct(10-32)
β° Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: test
π Additional comments (9)
src/main/java/site/kikihi/custom/platform/adapter/in/web/dto/request/product/KeyboardRecommendationRequest.java (1)
9-10: μ€ν€λ§ λͺ μΉ λ³΄μ LGTM.λͺ μΉλ§ λ³κ²½λλ©° λμ μν₯ μμ.
src/main/java/site/kikihi/custom/platform/adapter/out/RecommendKeyboardAdapter.java (3)
122-127: κ°κ²© νν°λ§ λ‘μ§ κ°μ λ¨λμ
priceBounds리μ€νΈλ₯Ό μ¬μ©νμ¬ κ°κ²© 쑰건μ μ²λ¦¬νλ λ°©μμ΄ μ’μ΅λλ€. μ½λκ° λ κΉλνκ³ μ μ§λ³΄μκ° μ©μ΄ν΄μ‘λ€μ.
55-58: μΌκ΄λ 쿼리 쑰립 ν¨ν΄ μ μ©λͺ¨λ νν° μ‘°κ±΄μ
andCriterias리μ€νΈμ λμ ν ν λ§μ§λ§μandOperatorλ‘ μ μ©νλ λ°©μμΌλ‘ ν΅μΌλμ΄ μ½λ μΌκ΄μ±μ΄ ν₯μλμμ΅λλ€.Also applies to: 71-74, 98-101, 113-116
92-92: Null-safe λΉκ΅ ν¨ν΄ μ¬μ©μμλ₯Ό μΌμͺ½μ λλ null-safe λΉκ΅ ν¨ν΄μ μ¬μ©νμ¬ NullPointerExceptionμ λ°©μ§ν κ²μ΄ μ’μ΅λλ€.
Also applies to: 107-107
src/main/java/site/kikihi/custom/platform/application/in/recommendation/RecommendationUseCase.java (1)
18-18: μ μ ν λ°ν νμ λ³κ²½
getSimilarProductsλ©μλκ°List<Product>λμList<KeyboardRecommendationResponse>λ₯Ό λ°ννλλ‘ λ³κ²½λμ΄, λΆλ§ν¬ μ¬λΆ(likedByMe) μ 보λ₯Ό ν¬ν¨ν μλ΅μ μ 곡ν μ μκ² λμμ΅λλ€. μ΄λ ν΄λΌμ΄μΈνΈμκ² λ νλΆν μ 보λ₯Ό μ 곡νλ μ’μ κ°μ μ λλ€.src/main/java/site/kikihi/custom/platform/adapter/in/web/RecommendationController.java (1)
79-82: μλΉμ€ κ³μΈ΅ μ± μ λΆλ¦¬ κ°μ컨νΈλ‘€λ¬μμ DTO λ³ν λ‘μ§μ΄ μ κ±°λκ³ μλΉμ€ κ³μΈ΅μμ μ§μ
KeyboardRecommendationResponse리μ€νΈλ₯Ό λ°ννλλ‘ κ°μ λμμ΅λλ€. μ΄λ λ¨μΌ μ± μ μμΉ(SRP)μ λΆν©νλ μ’μ λ³κ²½μ λλ€.src/main/java/site/kikihi/custom/platform/application/service/RecommendationService.java (1)
122-126: λΆλ§ν¬ νμΈ λ‘μ§ μΆκ°κ° μ νμ λν΄ κ°λ³μ μΌλ‘ λΆλ§ν¬ μ¬λΆλ₯Ό νμΈνμ¬
likedByMeνλλ₯Ό μ€μ νλ λ‘μ§μ΄ μΆκ°λμμ΅λλ€. μ¬μ©μλ³ λ§μΆ€ μ 보 μ 곡μ μν μ’μ κ°μ μ λλ€.src/main/java/site/kikihi/custom/platform/adapter/in/web/dto/response/product/KeyboardRecommendationResponse.java (2)
37-37: null κ°λ₯ν κ°κ²© νλλ‘ λ³κ²½
priceνλκ° primitivedoubleμμ wrapperDoubleλ‘ λ³κ²½λμ΄ null κ°μ μ²λ¦¬ν μ μκ² λμμ΅λλ€. μ΄λ κ°κ²© μ λ³΄κ° μλ κ²½μ°λ₯Ό λͺ μμ μΌλ‘ μ²λ¦¬ν μ μμ΄ μ’μ κ°μ μ λλ€.
46-55: λΆλ§ν¬ μ 보λ₯Ό ν¬ν¨ν ν©ν 리 λ©μλ κ°μ
fromλ©μλκ°likedByMeνλΌλ―Έν°λ₯Ό λ°λλ‘ λ³κ²½λμ΄, μ¬μ©μλ³ λΆλ§ν¬ μνλ₯Ό μ νν λ°μν μ μκ² λμμ΅λλ€.
π μμ ν λ΄μ©
π μ°Έκ³ μ¬ν
πΌοΈ μ€ν¬λ¦°μ·
π κ΄λ ¨ μ΄μ
#69
β 체ν¬λ¦¬μ€νΈ
Summary by CodeRabbit
μ κ· κΈ°λ₯
κ°μ
λ²κ·Έ μμ
λ¬Έμ