Skip to content
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

포인트 상품 목록 조회 불가 #82

Merged
merged 2 commits into from
Nov 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.coniverse.dangjang.domain.point.service;

import java.time.LocalDate;
import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;

Expand Down Expand Up @@ -181,13 +182,14 @@ private int getBalancePoint(int changePoint, int balancePoint) {
* 구매 가능 상품 조회
* <p>
* 유저의 현재 포인트와 구매 가능한 상품을 조회한다.
* 11월 10일 이후 포인트 서비스를 종료한다.
*
* @param oauthId 유저 아이디
* @since 1.0.0
*/
public ProductListResponse getProducts(String oauthId) {
int balancePoint = pointSearchService.findUserPointByOauthId(oauthId).getPoint();
List<PointProduct> productList = pointSearchService.findAllByType(PointType.USE);
List<PointProduct> productList = new ArrayList<>();
List<String> descriptionListToEarnPoint = pointSearchService.findAllByType(PointType.EARN).stream()
.map(PointProduct::getDescription)
.collect(Collectors.toList());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,6 @@ void tearDown() {
ProductListResponse response = pointService.getProducts(유저.getOauthId());
//then
assertThat(response.balancedPoint()).isEqualTo(유저_포인트.getPoint());
assertThat(response.productList()).hasSize(useTypeProductSize);
assertThat(response.descriptionListToEarnPoint()).hasSize(earnTypeProductSize);
}

Expand Down
Loading