Skip to content

Commit

Permalink
Merge branch 'develop' into feature/12-purchase-progress
Browse files Browse the repository at this point in the history
  • Loading branch information
Su-daa committed Jan 25, 2024
2 parents fe5b150 + 59fce3d commit 2ee388e
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,18 @@ public void createSystemMessageOfTimeOut(Long productId, Long sellerId, Long buy
"20분이 초과되었습니다. 아직 구매를 원하신다면 재결제 버튼을 눌러 결제해주세요."));
}

/***
* 자동 양도 완료 관련 시스템 메세지 생성
* @param productId 상품 ID
* @param sellerId 판매자 ID
* @param buyerId 구매자 ID
*/
public void createSystemMessageOfCompletedTransferByScheduler(Long productId, Long sellerId, Long buyerId) {
ChatRoom chatRoom = getChatRoomByBuyerIdAndProductId(buyerId, productId);
createChat(new ChatRequest(chatRoom.getId(), "SYSTEM", sellerId, "양도가 완료되었습니다!"));
createChat(new ChatRequest(chatRoom.getId(), "SYSTEM", buyerId, "양도가 완료되었습니다!"));
}

/***
* 채팅방 ID를 통한 채팅방 조회
* @param chatRoomId 채팅방 ID
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,12 +107,15 @@ public void changeStatus() {
+ "원활한 정산 진행을 위해 '마이페이지 - 나의 계좌'정보를 다시 한번 확인해주세요.");

// 판매자에게 계좌 등록 알림 전송

if (user != null && user.getAccountNumber() == null) {
alertService.createAlert(product.getUserId(),
"'" + product.getAccommodationName() + "(" + product.getRoomName()
+ ")'상품에 대한 원활한 정산을 위해 '마이페이지 > 내 계좌'에서 입금받으실 계좌를 등록해주세요.");
}

//자동 양도완료 관련 시스템 메세지 전송
chatService.createSystemMessageOfCompletedTransferByScheduler(product.getId(),
product.getUserId(), transferNego.getUser().getId());
}
negoRepository.saveAll(transferNegos);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,9 @@ public List<PurchaseCompletedResponse> getPurchaseCompletedHistory(PrincipalDeta
List<PurchaseCompletedResponse> purchaseCompletedResponses = new ArrayList<>();

for (Order order : orders) {
if (order.isCustomerViewCheck()) {
continue;
}
Product product = productService.getProduct(order.getProductId());
PurchaseCompletedResponse response = PurchaseCompletedResponse.create(product, order);
purchaseCompletedResponses.add(response);
Expand Down

0 comments on commit 2ee388e

Please sign in to comment.