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

release: 서버 배포 #276

Merged
merged 18 commits into from
Nov 19, 2024
Merged
Changes from 1 commit
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
a5b3af0
#264 feat: 채팅 및 편지 결제 api 추가
aeyongdodam Oct 5, 2024
9e862cd
#264 feat: 일대다 상담 api 추가
aeyongdodam Oct 5, 2024
f42b73d
Merge branch 'develop' of https://github.com/sharemindteam/sharemind-…
aeyongdodam Oct 5, 2024
bd2d66d
#270 feat: Payment에 지급일자 나타내는 settledAt 필드 추가
letskuku Oct 28, 2024
a940aea
#270 fix: PaymentGetCounselorResponse에서 지급일자 필드명 수정, 상담일자 필드 추가
letskuku Oct 28, 2024
efbe218
#270 feat: 정산 총금액 필드 dto에 한번만 사용되도록 dto 구조 수정
letskuku Oct 28, 2024
f72bde9
#270 fix: PaymentGetCustomerResponse에서 상담 결제 날짜 알맞게 반환되도록 수정
letskuku Oct 28, 2024
d46bdf9
Merge pull request #272 from sharemindteam/fix/270-counselor-payment
letskuku Oct 31, 2024
b1d788e
#270 fix: PaymentGetCounselorResponse에서 total 필드 제거
letskuku Oct 31, 2024
ea75121
Merge pull request #273 from sharemindteam/fix/270-counselor-payment
letskuku Oct 31, 2024
1c33236
#271 fix: 수수료율 수정
letskuku Nov 2, 2024
0543dcc
#271 feat: Payment에 수수료 필드 추가
letskuku Nov 2, 2024
a7f9ab5
#271 feat: 순수익 계산 로직 수정
letskuku Nov 2, 2024
90d122e
#271 refactor: 코드 로직 형식 통일
letskuku Nov 2, 2024
3ab1eb1
Merge pull request #274 from sharemindteam/fix/271-payment-fee
letskuku Nov 4, 2024
98e7084
feat: 상담 상태 및 내림차순 정렬
aeyongdodam Nov 11, 2024
5f5ac4d
Merge branch 'develop' of https://github.com/sharemindteam/sharemind-…
aeyongdodam Nov 11, 2024
2f73dd6
Merge pull request #275 from sharemindteam/feature/264-admin-paid-api
aeyongdodam Nov 18, 2024
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
Prev Previous commit
Next Next commit
#270 feat: 정산 총금액 필드 dto에 한번만 사용되도록 dto 구조 수정
letskuku committed Oct 28, 2024
commit efbe2182e508fd8fdd2cb8dbb514e9f7b27ac1aa
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@
import com.example.sharemind.customer.domain.Customer;
import com.example.sharemind.payment.domain.Payment;
import com.example.sharemind.payment.dto.response.PaymentGetCounselorHomeResponse;
import com.example.sharemind.payment.dto.response.PaymentGetCounselorResponse;
import com.example.sharemind.payment.dto.response.PaymentGetCounselorResponses;
import com.example.sharemind.payment.dto.response.PaymentGetCustomerResponse;

import java.util.List;
@@ -20,7 +20,7 @@ public interface PaymentService {

List<Payment> getRefundWaitingPayments();

List<PaymentGetCounselorResponse> getPaymentsByCounselor(Long paymentId, String status, String sort, Long customerId);
PaymentGetCounselorResponses getPaymentsByCounselor(Long paymentId, String status, String sort, Long customerId);

void updateSettlementOngoingByCounselor(Long paymentId, Long customerId);

Original file line number Diff line number Diff line change
@@ -12,6 +12,7 @@
import com.example.sharemind.payment.domain.Payment;
import com.example.sharemind.payment.dto.response.PaymentGetCounselorHomeResponse;
import com.example.sharemind.payment.dto.response.PaymentGetCounselorResponse;
import com.example.sharemind.payment.dto.response.PaymentGetCounselorResponses;
import com.example.sharemind.payment.dto.response.PaymentGetCustomerResponse;
import com.example.sharemind.payment.exception.PaymentErrorCode;
import com.example.sharemind.payment.exception.PaymentException;
@@ -97,7 +98,7 @@ public List<Payment> getRefundWaitingPayments() {
}

@Override
public List<PaymentGetCounselorResponse> getPaymentsByCounselor(Long paymentId, String status,
public PaymentGetCounselorResponses getPaymentsByCounselor(Long paymentId, String status,
String sort, Long customerId) {
Counselor counselor = counselorService.getCounselorByCustomerId(customerId);
PaymentCounselorStatus counselorStatus = PaymentCounselorStatus.getPaymentCounselorStatusByName(
@@ -147,7 +148,7 @@ public List<PaymentGetCounselorResponse> getPaymentsByCounselor(Long paymentId,
paymentId, counselor, counselorStatus, sortTime, pageable))
.map(payment -> PaymentGetCounselorResponse.of(payment, finalTotal));

return page.getContent();
return PaymentGetCounselorResponses.of(total, page.getContent());
}

@Transactional
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
package com.example.sharemind.payment.dto.response;

import io.swagger.v3.oas.annotations.media.Schema;
import java.util.List;
import lombok.Builder;
import lombok.Getter;

@Getter
public class PaymentGetCounselorResponses {

@Schema(description = "금액 합계")
private final Long total;

@Schema(description = "정산 정보 목록")
private final List<PaymentGetCounselorResponse> paymentGetCounselorResponses;

@Builder
public PaymentGetCounselorResponses(Long total, List<PaymentGetCounselorResponse> paymentGetCounselorResponses) {
this.total = total;
this.paymentGetCounselorResponses = paymentGetCounselorResponses;
}

public static PaymentGetCounselorResponses of (Long total, List<PaymentGetCounselorResponse> paymentGetCounselorResponses) {
return PaymentGetCounselorResponses.builder()
.total(total)
.paymentGetCounselorResponses(paymentGetCounselorResponses)
.build();
}
}
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@
import com.example.sharemind.global.jwt.CustomUserDetails;
import com.example.sharemind.payment.application.PaymentService;
import com.example.sharemind.payment.dto.response.PaymentGetCounselorHomeResponse;
import com.example.sharemind.payment.dto.response.PaymentGetCounselorResponse;
import com.example.sharemind.payment.dto.response.PaymentGetCounselorResponses;
import com.example.sharemind.payment.dto.response.PaymentGetCustomerResponse;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
@@ -100,7 +100,7 @@ public ResponseEntity<Void> updateRefundWaitingByCustomer(@PathVariable Long pay
2. 2번째 요청부터 paymentId는 직전 요청의 조회 결과 3개 중 마지막 paymentId""")
})
@GetMapping("/counselors")
public ResponseEntity<List<PaymentGetCounselorResponse>> getPaymentsByCounselor(@RequestParam String status,
public ResponseEntity<PaymentGetCounselorResponses> getPaymentsByCounselor(@RequestParam String status,
@RequestParam String sort,
@RequestParam Long paymentId,
@AuthenticationPrincipal CustomUserDetails customUserDetails) {