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

fix: 채팅방 상세 조회 - 채팅상태: 양도대기중 - 바로 결제인 경우 추가 #215

Merged
merged 1 commit into from
Jan 24, 2024
Merged
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 @@ -29,8 +29,8 @@
import site.goldenticket.domain.chat.dto.response.ChatRoomDetailResponse;
import site.goldenticket.domain.chat.dto.response.ChatRoomInfoResponse;
import site.goldenticket.domain.chat.dto.response.ChatRoomListResponse;
import site.goldenticket.domain.chat.dto.response.ChatRoomShortListResponse;
import site.goldenticket.domain.chat.dto.response.ChatRoomResponse;
import site.goldenticket.domain.chat.dto.response.ChatRoomShortListResponse;
import site.goldenticket.domain.chat.dto.response.ChatRoomShortResponse;
import site.goldenticket.domain.chat.entity.Chat;
import site.goldenticket.domain.chat.entity.ChatRoom;
Expand Down Expand Up @@ -216,7 +216,7 @@ public void createStartMessageOfNewChatRoom(Long chatRoomId) {
* @param nickname 회원 닉네임
* @return 메세지
*/
private String createEntranceMessage (String nickname) {
private String createEntranceMessage(String nickname) {
return nickname + "님이 입장하셨습니다.";
}

Expand Down Expand Up @@ -389,7 +389,13 @@ private String getStatusOfChatRoom(Long buyerId, Long productId) {
product.getId()).orElseThrow(() -> new CustomException(NEGO_NOT_FOUND));
if (nego.getStatus().equals(NegotiationStatus.PAYMENT_PENDING)) {
chatStatus = "PAYMENT_PENDING";
} else if (nego.getStatus().equals(NegotiationStatus.TRANSFER_PENDING)) {
}
} else if (product.getProductStatus().equals(ProductStatus.RESERVED)) {
Order order = orderRepository.findByProductIdAndStatus(product.getId(),
OrderStatus.WAITING_TRANSFER)
.orElseThrow(() -> new CustomException(ORDER_NOT_FOUND));
if (order.getUserId().equals(buyerId) && order.getStatus()
.equals(OrderStatus.WAITING_TRANSFER)) {
chatStatus = "TRANSFER_PENDING";
}
} else if (product.getProductStatus().equals(ProductStatus.SOLD_OUT)) {
Expand Down