diff --git a/backend/src/main/java/autoever2/cartag/service/OptionService.java b/backend/src/main/java/autoever2/cartag/service/OptionService.java index 11d5520..eab9301 100644 --- a/backend/src/main/java/autoever2/cartag/service/OptionService.java +++ b/backend/src/main/java/autoever2/cartag/service/OptionService.java @@ -52,7 +52,7 @@ public List getDefaultOptionList(int carId) { .optionName(data.getOptionName()) .optionCategoryName(data.getOptionCategoryName()) .optionImage(data.getOptionImage()) - .hasHmgData(data.getOptionUsedCount() != null).build()).collect(Collectors.toList()); + .hasHmgData(data.getOptionUsedCount() > 0).build()).collect(Collectors.toList()); } //TODO: RuntimeException 처리 diff --git a/backend/src/test/java/autoever2/cartag/service/OptionServiceTest.java b/backend/src/test/java/autoever2/cartag/service/OptionServiceTest.java index 00a63be..d51da5a 100644 --- a/backend/src/test/java/autoever2/cartag/service/OptionServiceTest.java +++ b/backend/src/test/java/autoever2/cartag/service/OptionServiceTest.java @@ -221,6 +221,7 @@ void getDefaultOptionList() { .optionName("적외선 무릎 워머") .optionCategoryName("악세사리") .optionImage("/images/options/sub/warmer.jpg") + .optionUsedCount(0.0) .build(); OptionShortMappedDto data3 = OptionShortMappedDto.builder() .optionId(3)