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 fix: PaymentGetCounselorResponse에서 total 필드 제거
  • Loading branch information
letskuku committed Oct 31, 2024

Verified

This commit was signed with the committer’s verified signature.
caixw caixw
commit b1d788efefe7204cd9216edfd4924bb11ce0cc29
Original file line number Diff line number Diff line change
@@ -139,14 +139,13 @@ public PaymentGetCounselorResponses getPaymentsByCounselor(Long paymentId, Strin
}

Pageable pageable = PageRequest.of(DEFAULT_PAGE_NUMBER, PAYMENT_COUNSELOR_PAGE_SIZE);
Long finalTotal = total;
Page<PaymentGetCounselorResponse> page =
(paymentId == 0 ?
paymentRepository.findAllByCounselorAndCounselorStatusAndUpdatedAtIsBefore(
counselor, counselorStatus, sortTime, pageable) :
paymentRepository.findAllByPaymentIdLessThanAndCounselorAndCounselorStatusAndUpdatedAtIsBefore(
paymentId, counselor, counselorStatus, sortTime, pageable))
.map(payment -> PaymentGetCounselorResponse.of(payment, finalTotal));
.map(PaymentGetCounselorResponse::of);

return PaymentGetCounselorResponses.of(total, page.getContent());
}
Original file line number Diff line number Diff line change
@@ -45,16 +45,13 @@ public class PaymentGetCounselorResponse {
@Schema(description = "지급 계좌")
private final String account;

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

public static PaymentGetCounselorResponse of(Payment payment, Long total) {
public static PaymentGetCounselorResponse of(Payment payment) {
Consult consult = payment.getConsult();
Boolean isChat = consult.getChat() != null;

return new PaymentGetCounselorResponse(payment.getPaymentId(),
consult.getCustomer().getNickname(), isChat, consult.getCost() - FEE,
consult.getCost(), FEE, consult.getConsultedAt(), payment.getSettledAt(),
consult.getCounselor().getAccount(), total);
consult.getCounselor().getAccount());
}
}