Skip to content

Commit 5bffb7d

Browse files
feat: 거래 타입명 변경 (#185)
* feat: 장바구니 추가 기능 구현 * feat: 장바구니 조회 기능 구현 * feat: 상품 주문과 식권 사용 기능 구현 * style: 포인트트랜잭션 레포지토리명 변경 * deploy: 재배포 * deploy: 재배포2 * deploy: 로그인 로직 수정에 따른 재배포 * deploy: 로그인 로직 수정에 따른 재배포2 * feat: 식권 사용 기능 구현 * feat: yml 수정 사항 반영 * feat: 식권 사용 로직 수정 * feat: 주문 로직 수정 완료 * fix: 장바구니에 아무것도 없을 때 주문 시 active 되는 현상 수정 * feat: 주문 완료 시 리턴 값 수정 * feat: 내 그룹 조회 기능 구현 * feat: 기본 프로필 이미지 url 추가 * feat: 그룹 멤버 전체 조회 기능 구현 * feat: 1인당 사용 가능 금액 설정 컬럼 추가 * feat: 내 지갑 조회 기능 구현 * feat: 선결제 기능 구현 * feat: 유저 홈 화면 조회 기능 구현 * feat: 그룹 상세 조회 기능 구현 * feat: 가게 상세 조회 쿼리 수정 * deploy: 변경사항 반영을 위한 커밋 * deploy: 수정 사항 반영 재배포 * deploy: rds 교체로 인한 재배포 * deploy: rds 교체로 인한 재배포2 * feat: 홈 화면 소속팀 조회 쿼리 제대로 안되던 현상 해결, 대표이미지 반환 추가 * feat: 그룹 상세 조회 응답 컬럼명 변경 * feat: memberLimit 컬럼 삭제 * feat: 선결제 시 기존 결제 내역과 멱등성 문제 해결 * fix: 팀 상세 조회 시 이미지 쿼리가 의미 없이 join 되던 쿼리 수정 * feat: 가게 검색 기능 대폭 수정 * feat: 프론트 요구사 반영 * feat: searchcondition 삭제 * feat: 팀타입 desription 리턴 하도록 수정 * feat: 카테고리별 팀 조회 시 팀 생성일 컬럼 추가 * feat: 매장찾기_상세 페이지 조회 기능 구현 * feat: 비밀 코드 조회 기능 엔드 포인트 수정 * fix: conflict fix * hotfix: 서버 복구 * hotfix: 서버 복구2 * feat: Barobill api 연동 * fix: 홈 화면에 같은 데이터가 중복되는 현상 수정 * infra: ElastiCache 연결을 위한 docker-compose 설정 * infra: cicd script 수정 * infra: cicd script ec2 주소 설정 * infra: cicd script 수정2 * infra: cicd script 수정3 * infra: cicd script 수정4 * infra: cicd script 수정5 * infra: cicd script 수정6 * infra: cicd script 수정7 * infra: cicd script 수정7 * infra: cicd script 수정8 * infra: cicd script 수정9 * infra: cicd script 수정10 * infra: cicd script 수정11 * infra: cicd script 수정12 * infra: cicd script 수정13 * infra: cicd script 수정14 * infra: cicd script 수정15 * infra: cicd script 수정16 * infra: cicd script 수정17 * infra: cicd script 수정18 * infra: cicd script 수정19 * infra: cicd script 수정20 * infra: cicd script 수정21 * infra: cicd script 수정22 * fix: 보유금액이 선결제 금액보다 작을 경우 상태값 변경(200->400) * feat: 홈화면 가게 별 선결제 디데이 추가, 쿼리문 조정 * feat: 주문하기 로직 정상화 * feat: 장바구니에 다른 가게 물건이 있는지 검증 구현 * feat: 장바구니 비우기 기능 구현 * deploy: cd retry * feat: 매장 상세 페이지 조회 메뉴 정렬 조건 추가 * feat: 세금명세서 역발행 기능 추가 * feat: 거래 타입명 변경
1 parent 6090d09 commit 5bffb7d

File tree

5 files changed

+66
-19
lines changed

5 files changed

+66
-19
lines changed

src/main/java/com/jangburich/domain/barobill/application/BarobillService.java

Lines changed: 31 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
import com.baroservice.ws.TaxInvoice;
77
import com.baroservice.ws.TaxInvoiceTradeLineItem;
88
import com.jangburich.domain.barobill.dto.request.GetCertificateRegistURLRequest;
9+
import com.jangburich.domain.barobill.dto.request.RegistAndReverseIssueTaxInvoiceRequest;
910
import com.jangburich.domain.barobill.dto.request.RegistCorpRequest;
1011
import java.util.regex.Pattern;
1112
import lombok.RequiredArgsConstructor;
@@ -48,33 +49,34 @@ public void getCertificateRegistURL(GetCertificateRegistURLRequest getCertificat
4849
}
4950

5051
@Transactional
51-
public void registAndReverseIssueTaxInvoice() {
52+
public void registAndReverseIssueTaxInvoice(
53+
RegistAndReverseIssueTaxInvoiceRequest registAndReverseIssueTaxInvoiceRequest) {
5254
// 공급자, 공급받는자의 관리번호 채번
5355
String invoicerMgtNum = "000001-R";
5456
String invoiceeMgtNum = "000001-E";
5557

5658
// 공급자, 공급받는자의 바로빌 아이디 불러오기
57-
String invoicerBarobillID = "barobill";
58-
String invoiceeBarobillID = "barobill";
59+
String invoicerBarobillID = registAndReverseIssueTaxInvoiceRequest.invoicerBarobillID();
60+
String invoiceeBarobillID = registAndReverseIssueTaxInvoiceRequest.invoiceeBarobillID();
5961

6062
// 세금계산서 내용을 담은 클래스(또는 구조체) 생성
6163
TaxInvoice taxInvoice = new TaxInvoice();
6264

6365
/**/
64-
taxInvoice.setIssueDirection(1);
66+
taxInvoice.setIssueDirection(2);
6567
taxInvoice.setTaxInvoiceType(1);
6668

6769
taxInvoice.setModifyCode("");
6870

6971
taxInvoice.setTaxType(1);
7072
taxInvoice.setTaxCalcType(1);
71-
taxInvoice.setPurposeType(2);
73+
taxInvoice.setPurposeType(1);
7274

73-
taxInvoice.setWriteDate("");
75+
taxInvoice.setWriteDate("20241129");
7476

75-
taxInvoice.setAmountTotal("");
76-
taxInvoice.setTaxTotal("");
77-
taxInvoice.setTotalAmount("");
77+
taxInvoice.setAmountTotal("100");
78+
taxInvoice.setTaxTotal("100");
79+
taxInvoice.setTotalAmount("200");
7880
taxInvoice.setCash("");
7981
taxInvoice.setChkBill("");
8082
taxInvoice.setNote("");
@@ -94,30 +96,31 @@ public void registAndReverseIssueTaxInvoice() {
9496

9597
// 공급자 정보
9698
taxInvoice.setInvoicerParty(new InvoiceParty());
97-
taxInvoice.getInvoicerParty().setMgtNum("");
99+
taxInvoice.getInvoicerParty().setMgtNum(invoicerMgtNum);
98100
taxInvoice.getInvoicerParty().setCorpNum("");
99101
taxInvoice.getInvoicerParty().setTaxRegID("");
100-
taxInvoice.getInvoicerParty().setCorpName("");
102+
taxInvoice.getInvoicerParty().setCorpName("partisbutchershop");
101103
taxInvoice.getInvoicerParty().setCEOName("");
102104
taxInvoice.getInvoicerParty().setAddr("");
103-
taxInvoice.getInvoicerParty().setBizType("");
104-
taxInvoice.getInvoicerParty().setBizClass("");
105-
taxInvoice.getInvoicerParty().setContactID("");
105+
taxInvoice.getInvoicerParty().setBizType("한식");
106+
taxInvoice.getInvoicerParty().setBizClass("음식점업");
107+
taxInvoice.getInvoicerParty().setContactID(invoicerBarobillID);
106108
taxInvoice.getInvoicerParty().setContactName("");
107109
taxInvoice.getInvoicerParty().setTEL("");
108110
taxInvoice.getInvoicerParty().setHP("");
109111
taxInvoice.getInvoicerParty().setEmail("");
110112

111113
//공급받는자 정보
112114
taxInvoice.setInvoiceeParty(new InvoiceParty());
115+
taxInvoice.getInvoiceeParty().setMgtNum(invoiceeMgtNum);
113116
taxInvoice.getInvoiceeParty().setCorpNum("");
114117
taxInvoice.getInvoiceeParty().setTaxRegID("");
115-
taxInvoice.getInvoiceeParty().setCorpName("");
118+
taxInvoice.getInvoiceeParty().setCorpName("Jangburich");
116119
taxInvoice.getInvoiceeParty().setCEOName("");
117120
taxInvoice.getInvoiceeParty().setAddr("");
118121
taxInvoice.getInvoiceeParty().setBizType("");
119122
taxInvoice.getInvoiceeParty().setBizClass("");
120-
taxInvoice.getInvoiceeParty().setContactID("");
123+
taxInvoice.getInvoiceeParty().setContactID(invoiceeBarobillID);
121124
taxInvoice.getInvoiceeParty().setContactName("");
122125
taxInvoice.getInvoiceeParty().setTEL("");
123126
taxInvoice.getInvoiceeParty().setHP("");
@@ -153,5 +156,17 @@ public void registAndReverseIssueTaxInvoice() {
153156

154157
taxInvoice.getTaxInvoiceTradeLineItems().getTaxInvoiceTradeLineItem().add(taxInvoiceTradeLineItem);
155158

159+
int result = barobillApiService.taxInvoice.registAndReverseIssueTaxInvoice(CERT_KEY, "", taxInvoice,
160+
false,
161+
false, "");
162+
163+
if (result < 0) { // API 호출 실패
164+
// 오류코드 내용에 따라 파라메터를 수정하여 다시 실행해주세요.
165+
String errMessage = barobillApiService.taxInvoice.getErrString(CERT_KEY, result);
166+
System.out.println(errMessage);
167+
} else { // 성공
168+
// 파트너 프로그램의 후 처리
169+
System.out.println("성공");
170+
}
156171
}
157172
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
package com.jangburich.domain.barobill.dto.request;
2+
3+
public record RegistAndReverseIssueTaxInvoiceRequest(
4+
String invoicerBarobillID,
5+
String invoiceeBarobillID
6+
) {
7+
8+
}

src/main/java/com/jangburich/domain/barobill/presentation/BarobillController.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import com.jangburich.domain.barobill.application.BarobillService;
44
import com.jangburich.domain.barobill.dto.request.GetCertificateRegistURLRequest;
5+
import com.jangburich.domain.barobill.dto.request.RegistAndReverseIssueTaxInvoiceRequest;
56
import com.jangburich.domain.barobill.dto.request.RegistCorpRequest;
67
import com.jangburich.global.payload.Message;
78
import com.jangburich.global.payload.ResponseCustom;
@@ -35,4 +36,12 @@ public ResponseCustom<Message> getCertificateRegistURL(
3536
barobillService.getCertificateRegistURL(getCertificateRegistURLRequest);
3637
return ResponseCustom.OK(Message.builder().message("success").build());
3738
}
39+
40+
@PostMapping("/registAndReverseIssueTaxInvoice")
41+
public ResponseCustom<Message> registAndReverseIssueTaxInvoice(
42+
@RequestBody RegistAndReverseIssueTaxInvoiceRequest registAndReverseIssueTaxInvoiceRequest
43+
) {
44+
barobillService.registAndReverseIssueTaxInvoice(registAndReverseIssueTaxInvoiceRequest);
45+
return ResponseCustom.OK(Message.builder().message("success").build());
46+
}
3847
}
Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,20 @@
11
package com.jangburich.domain.point.domain;
22

33
public enum TransactionType {
4-
POINT_PURCHASE, FOOD_PURCHASE, REFUND, RECHARGE, PREPAY
4+
POINT_PURCHASE("지갑 충전"),
5+
FOOD_PURCHASE("제휴 매장 음식 구매"),
6+
REFUND("포인트 환불"),
7+
PREPAY("제휴 매장 선결제 금액 충전"),
8+
PREPAY_REFUND("제휴 매장 선결제 금액 환불"),
9+
FOOD_REFUND("제휴 매장 음식 환불");
10+
11+
private final String displayName;
12+
13+
TransactionType(String displayName) {
14+
this.displayName = displayName;
15+
}
16+
17+
public String getDisplayName() {
18+
return displayName;
19+
}
520
}

src/main/java/com/jangburich/domain/user/service/UserService.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,8 +181,8 @@ public WalletResponse getMyWallet(String userId) {
181181
.map(transaction -> new PurchaseHistory(
182182
transaction.getCreatedAt().format(DateTimeFormatter.ofPattern("MM.dd")),
183183
transaction.getTransactionedPoint(),
184-
transaction.getStore() != null ? transaction.getStore().getName() : "지갑 충전",
185-
transaction.getTransactionType().name()))
184+
transaction.getStore() != null ? transaction.getStore().getName() : "알 수 없음",
185+
transaction.getTransactionType().getDisplayName()))
186186
.toList();
187187
return new WalletResponse(user.getPoint(), purchaseHistories);
188188
}

0 commit comments

Comments
 (0)