-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: 커서 방식 부분에 정렬 기준 클릭률 순 추가 (#220)
* refactor: statistic 네이밍 수정 * test: statistics service Test * test: statistics service Test * feat: 정렬 기준에 추천 수 추가 * refactor : 테스트 변경 * refactor: statistic 원상복구 * refactor: 클릭률은 통계테이블이 아닌 클릭률 테이블에서 가져오는 걸로 변경 * refactor: test failed * refactor: 커서 네이밍 변경 * refactor: 잘못 들어간 커밋 삭제 * refactor: 잘못 들어간 커밋 삭제 * refactor: 네이밍 수정 * Update src/main/java/com/woowacamp/soolsool/core/liquor/service/LiquorService.java Co-authored-by: Jeonggyu Choi <[email protected]> * test: 커서, 클릭 수 not null일 때 추가 * refactor: 병합 * refactor: 피드백 반영 * refactor : 패키지 변경 * refactor : click Response 따로 생성 * refactor : click Response 따로 생성하여 관련 메서드들 수정 * refactor : PageClickResponse 메서드명 수정 * refactor : click, latest 순 나눔 * fix: test failed * test : 커서 방식 테스트 추가 * refactor: 피드백 반영 * Update src/test/java/com/woowacamp/soolsool/core/liquor/service/LiquorServiceIntegrationTest.java Co-authored-by: Jeonggyu Choi <[email protected]> * refactor: dto->response 분리 * refactor: 리팩터링 --------- Co-authored-by: Jeonggyu Choi <[email protected]>
- Loading branch information
Showing
27 changed files
with
364 additions
and
147 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
2 changes: 1 addition & 1 deletion
2
src/main/java/com/woowacamp/soolsool/core/liquor/controller/LiquorStockController.java
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
26 changes: 26 additions & 0 deletions
26
src/main/java/com/woowacamp/soolsool/core/liquor/dto/request/LiquorListRequest.java
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,26 @@ | ||
package com.woowacamp.soolsool.core.liquor.dto.request; | ||
|
||
import com.woowacamp.soolsool.core.liquor.domain.vo.LiquorBrewType; | ||
import com.woowacamp.soolsool.core.liquor.domain.vo.LiquorRegionType; | ||
import com.woowacamp.soolsool.core.liquor.domain.vo.LiquorStatusType; | ||
import lombok.Getter; | ||
import lombok.RequiredArgsConstructor; | ||
import org.springframework.lang.Nullable; | ||
|
||
|
||
@Getter | ||
@RequiredArgsConstructor | ||
public class LiquorListRequest { | ||
@Nullable | ||
private final LiquorBrewType brew; | ||
@Nullable | ||
private final LiquorRegionType region; | ||
@Nullable | ||
private final LiquorStatusType status; | ||
@Nullable | ||
private final String brand; | ||
@Nullable | ||
private final Long liquorId; | ||
@Nullable | ||
private final Long clickCount; | ||
} |
2 changes: 1 addition & 1 deletion
2
.../core/liquor/dto/LiquorModifyRequest.java → ...quor/dto/request/LiquorModifyRequest.java
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
2 changes: 1 addition & 1 deletion
2
...ol/core/liquor/dto/LiquorSaveRequest.java → ...liquor/dto/request/LiquorSaveRequest.java
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
2 changes: 1 addition & 1 deletion
2
...ore/liquor/dto/LiquorSearchCondition.java → ...or/dto/request/LiquorSearchCondition.java
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
2 changes: 1 addition & 1 deletion
2
...re/liquor/dto/LiquorStockSaveRequest.java → ...r/dto/request/LiquorStockSaveRequest.java
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
29 changes: 29 additions & 0 deletions
29
src/main/java/com/woowacamp/soolsool/core/liquor/dto/response/LiquorClickElementDto.java
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,29 @@ | ||
package com.woowacamp.soolsool.core.liquor.dto.response; | ||
|
||
import com.woowacamp.soolsool.core.liquor.domain.Liquor; | ||
import com.woowacamp.soolsool.core.liquor.domain.vo.LiquorCtrClick; | ||
import lombok.Getter; | ||
import lombok.RequiredArgsConstructor; | ||
|
||
@Getter | ||
@RequiredArgsConstructor | ||
public class LiquorClickElementDto { | ||
|
||
private final Long id; | ||
private final String name; | ||
private final String price; | ||
private final String imageUrl; | ||
private final Integer stock; | ||
private final Long clickCount; | ||
|
||
public LiquorClickElementDto(final Liquor liquor, final LiquorCtrClick clickCount) { | ||
this( | ||
liquor.getId(), | ||
liquor.getName(), | ||
liquor.getPrice().toString(), | ||
liquor.getImageUrl(), | ||
liquor.getTotalStock(), | ||
clickCount.getCount() | ||
); | ||
} | ||
} |
2 changes: 1 addition & 1 deletion
2
...core/liquor/dto/LiquorDetailResponse.java → ...or/dto/response/LiquorDetailResponse.java
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.