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

Feat: 이벤트시 포인트 적립 제외 구현 #97

Merged
merged 2 commits into from
May 15, 2024
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
Expand Up @@ -6,7 +6,7 @@
@Getter
@RequiredArgsConstructor
public enum Grade {

EVENT("EVENT", 0.0D),
ORDA("ORDA", 4.0D),
DEFAULT("Earlier", 6.3D);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
import com.readyvery.readyverydemo.config.SolApiConfig;
import com.readyvery.readyverydemo.config.TossPaymentConfig;
import com.readyvery.readyverydemo.domain.CeoInfo;
import com.readyvery.readyverydemo.domain.Grade;
import com.readyvery.readyverydemo.domain.Order;
import com.readyvery.readyverydemo.domain.Progress;
import com.readyvery.readyverydemo.domain.repository.OrderRepository;
Expand Down Expand Up @@ -89,7 +90,9 @@ public OrderStatusRes completeOrder(Long id, OrderStatusUpdateReq request) {
order.completeOrder(request.getStatus());

// 포인트 적립
pointService.giveOrderPoint(order, request.getStatus());
if (!order.getStore().getGrade().equals(Grade.EVENT)) {
pointService.giveOrderPoint(order, request.getStatus());
}

orderRepository.save(order);

Expand Down
Loading