|
|
@@ -18,6 +18,7 @@ import com.style24.core.biz.dao.TscOrderDao;
|
|
|
import com.style24.core.support.env.TscConstants;
|
|
|
import com.style24.core.support.message.TscMessageByLocale;
|
|
|
import com.style24.persistence.domain.DeliveryFee;
|
|
|
+import com.style24.persistence.domain.GiftCard;
|
|
|
import com.style24.persistence.domain.Order;
|
|
|
import com.style24.persistence.domain.OrderChange;
|
|
|
import com.style24.persistence.domain.Payment;
|
|
|
@@ -201,6 +202,7 @@ public class TscOrderChangeService {
|
|
|
String pgTid = map.getString("pgTid"); // PG거래ID
|
|
|
String payMeans = map.getString("payMeans"); // 결제수단
|
|
|
String pgGb = map.getString("pgGb"); // PG구분
|
|
|
+ String cashAuthNo = map.getString("cashAuthNo"); // 현금영수증 승인번호
|
|
|
String accountNo = map.getString("accountNo"); // 환불계좌번호
|
|
|
String accountNm = map.getString("accountNm"); // 환불계좌주명
|
|
|
String bankCd = map.getString("bankCd"); // 환불계좌은행코드
|
|
|
@@ -551,6 +553,7 @@ public class TscOrderChangeService {
|
|
|
kakaoPayService.cancelKakaoPayment(pg);
|
|
|
}
|
|
|
|
|
|
+ // 7. 환불정보 수정
|
|
|
Order refundOrder = new Order();
|
|
|
refundOrder.setOrdNo(ordNo);
|
|
|
refundOrder.setPaySq(pg.getPaySq());
|
|
|
@@ -558,6 +561,16 @@ public class TscOrderChangeService {
|
|
|
refundOrder.setUpdNo(userNo);
|
|
|
|
|
|
orderChangeDao.updateRefundInfo(refundOrder);
|
|
|
+
|
|
|
+ // 8. 현금영수증 취소 처리 (무통장입금 결제완료, 실시간계좌이체)
|
|
|
+ if (StringUtils.isNotBlank(cashAuthNo)) {
|
|
|
+ GiftCard cashReceipts = new GiftCard();
|
|
|
+ cashReceipts.setModType("STPC");
|
|
|
+ cashReceipts.setOrdNo(ordNo);
|
|
|
+ cashReceipts.setGfcdAmt(pg.getPartCancelAmt());
|
|
|
+
|
|
|
+ kcpService.kcpCashReceiptCancel(cashReceipts);
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
return map;
|
|
|
@@ -1874,20 +1887,21 @@ public class TscOrderChangeService {
|
|
|
result = orderRefundService.cnclRtnRefundAmt(cnclReqList);
|
|
|
|
|
|
// 4. 부분취소 처리 정보 설정
|
|
|
- result.setInt("ordNo", orderChange.getOrdNo()); // 주문번호
|
|
|
- result.setString("chgReason", orderChange.getChgReason()); // 변경사유
|
|
|
- result.setString("chgReasonNm", orderChange.getChgReasonNm()); // 변경사유명
|
|
|
- result.setString("chgMemo", orderChange.getChgMemo()); // 변경메모
|
|
|
- result.setString("accountNo", orderChange.getAccountNo()); // 환불계좌번호
|
|
|
- result.setString("accountNm", orderChange.getAccountNm()); // 환불계좌예금주명
|
|
|
- result.setString("bankCd", orderChange.getBankCd()); // 환불계좌은행코드
|
|
|
- result.setString("allLastCanYn", allLastCanYn); // 전체 마지막 취소 여부
|
|
|
- result.setString("reqGbn", orderChange.getReqGbn()); // 신청구분
|
|
|
- result.setString("ipAddress", orderChange.getIpAddress()); // IP주소
|
|
|
- result.setInt("custNo", orderChange.getCustNo()); // 고객번호
|
|
|
- result.setString("pgTid", refundPreInfo.getString("pgTid")); // PG거래ID
|
|
|
- result.setString("payMeans", refundPreInfo.getString("payMeans")); // 결제수단
|
|
|
- result.setString("pgGb", refundPreInfo.getString("pgGb")); // PG구분
|
|
|
+ result.setInt("ordNo", orderChange.getOrdNo()); // 주문번호
|
|
|
+ result.setString("chgReason", orderChange.getChgReason()); // 변경사유
|
|
|
+ result.setString("chgReasonNm", orderChange.getChgReasonNm()); // 변경사유명
|
|
|
+ result.setString("chgMemo", orderChange.getChgMemo()); // 변경메모
|
|
|
+ result.setString("accountNo", orderChange.getAccountNo()); // 환불계좌번호
|
|
|
+ result.setString("accountNm", orderChange.getAccountNm()); // 환불계좌예금주명
|
|
|
+ result.setString("bankCd", orderChange.getBankCd()); // 환불계좌은행코드
|
|
|
+ result.setString("allLastCanYn", allLastCanYn); // 전체 마지막 취소 여부
|
|
|
+ result.setString("reqGbn", orderChange.getReqGbn()); // 신청구분
|
|
|
+ result.setString("ipAddress", orderChange.getIpAddress()); // IP주소
|
|
|
+ result.setInt("custNo", orderChange.getCustNo()); // 고객번호
|
|
|
+ result.setString("pgTid", refundPreInfo.getString("pgTid")); // PG거래ID
|
|
|
+ result.setString("payMeans", refundPreInfo.getString("payMeans")); // 결제수단
|
|
|
+ result.setString("pgGb", refundPreInfo.getString("pgGb")); // PG구분
|
|
|
+ result.setString("cashAuthNo", refundPreInfo.getString("cashAuthNo")); // 현금영수증 승인번호
|
|
|
|
|
|
// 부분취소 처리
|
|
|
partialCancel(result, userNo);
|
|
|
@@ -2148,7 +2162,7 @@ public class TscOrderChangeService {
|
|
|
@SuppressWarnings("unchecked")
|
|
|
@Transactional("shopTxnManager")
|
|
|
public void allCnclComplete(OrderChange orderChange) {
|
|
|
- int ordNo = orderChange.getOrdNo();
|
|
|
+ Integer ordNo = orderChange.getOrdNo(); // 주문번호
|
|
|
String chgReason = orderChange.getChgReason(); // G686_10:고객변심, G686_20:관리자취소, G686_30:품절취소
|
|
|
String chgReasonNm = orderChange.getChgReasonNm(); // 고객변심, 관리자취소, 품절취소
|
|
|
String chgGb = TscConstants.OrderChangeGb.CANCEL.value(); // 변경구분
|
|
|
@@ -2383,6 +2397,23 @@ public class TscOrderChangeService {
|
|
|
|
|
|
orderChangeDao.updateRefundInfo(refundOrder);
|
|
|
}
|
|
|
+
|
|
|
+ // 12. 보증보험 취소 처리 (무통장입금 전 전체취소 시 처리)
|
|
|
+ if (TscConstants.OrderChangeStat.PAYMENT_BEFORE_CANCEL.value().equals(chgStat)) {
|
|
|
+ Order guarantee = new Order();
|
|
|
+ guarantee.setOrdNo(ordNo);
|
|
|
+
|
|
|
+ orderService.uSafeGuaranteePayedBeforeCancel(guarantee);
|
|
|
+ }
|
|
|
+
|
|
|
+ // 13. 현금영수증 취소 처리 (무통장입금 결제완료, 실시간계좌이체)
|
|
|
+ if (StringUtils.isNotBlank(payment.getCashAuthNo())) {
|
|
|
+ GiftCard cashReceipts = new GiftCard();
|
|
|
+ cashReceipts.setModType("STSQ");
|
|
|
+ cashReceipts.setOrdNo(ordNo);
|
|
|
+
|
|
|
+ kcpService.kcpCashReceiptCancel(cashReceipts);
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
@@ -2420,20 +2451,21 @@ public class TscOrderChangeService {
|
|
|
result = orderRefundService.cnclRtnRefundAmt(cnclReqList);
|
|
|
|
|
|
// 4. 부분취소 처리 정보 설정
|
|
|
- result.setInt("ordNo", orderChange.getOrdNo()); // 주문번호
|
|
|
- result.setString("chgReason", orderChange.getChgReason()); // 변경사유
|
|
|
- result.setString("chgReasonNm", orderChange.getChgReasonNm()); // 변경사유명
|
|
|
- result.setString("chgMemo", orderChange.getChgMemo()); // 변경메모
|
|
|
- result.setString("accountNo", orderChange.getAccountNo()); // 환불계좌번호
|
|
|
- result.setString("accountNm", orderChange.getAccountNm()); // 환불계좌예금주명
|
|
|
- result.setString("bankCd", orderChange.getBankCd()); // 환불계좌은행코드
|
|
|
- result.setString("allLastCanYn", allLastCanYn); // 전체 마지막 취소 여부
|
|
|
- result.setString("reqGbn", orderChange.getReqGbn()); // 신청구분
|
|
|
- result.setString("ipAddress", orderChange.getIpAddress()); // IP주소
|
|
|
- result.setInt("custNo", orderChange.getCustNo()); // 고객번호
|
|
|
- result.setString("pgTid", refundPreInfo.getString("pgTid")); // PG거래ID
|
|
|
- result.setString("payMeans", refundPreInfo.getString("payMeans")); // 결제수단
|
|
|
- result.setString("pgGb", refundPreInfo.getString("pgGb")); // PG구분
|
|
|
+ result.setInt("ordNo", orderChange.getOrdNo()); // 주문번호
|
|
|
+ result.setString("chgReason", orderChange.getChgReason()); // 변경사유
|
|
|
+ result.setString("chgReasonNm", orderChange.getChgReasonNm()); // 변경사유명
|
|
|
+ result.setString("chgMemo", orderChange.getChgMemo()); // 변경메모
|
|
|
+ result.setString("accountNo", orderChange.getAccountNo()); // 환불계좌번호
|
|
|
+ result.setString("accountNm", orderChange.getAccountNm()); // 환불계좌예금주명
|
|
|
+ result.setString("bankCd", orderChange.getBankCd()); // 환불계좌은행코드
|
|
|
+ result.setString("allLastCanYn", allLastCanYn); // 전체 마지막 취소 여부
|
|
|
+ result.setString("reqGbn", orderChange.getReqGbn()); // 신청구분
|
|
|
+ result.setString("ipAddress", orderChange.getIpAddress()); // IP주소
|
|
|
+ result.setInt("custNo", orderChange.getCustNo()); // 고객번호
|
|
|
+ result.setString("pgTid", refundPreInfo.getString("pgTid")); // PG거래ID
|
|
|
+ result.setString("payMeans", refundPreInfo.getString("payMeans")); // 결제수단
|
|
|
+ result.setString("pgGb", refundPreInfo.getString("pgGb")); // PG구분
|
|
|
+ result.setString("cashAuthNo", refundPreInfo.getString("cashAuthNo")); // 현금영수증 승인번호
|
|
|
|
|
|
// 부분취소 처리
|
|
|
partialCancel(result, userNo);
|
|
|
@@ -2535,6 +2567,7 @@ public class TscOrderChangeService {
|
|
|
result.setString("pgTid", cnclRtn.getPgTid()); // PG거래ID
|
|
|
result.setString("payMeans", cnclRtn.getPayMeans()); // 결제수단
|
|
|
result.setString("pgGb", cnclRtn.getPgGb()); // PG구분
|
|
|
+ result.setString("cashAuthNo", cnclRtn.getCashAuthNo()); // 현금영수증 승인번호
|
|
|
result.set("cnclReqList", cnclReqList); // 취소신청목록
|
|
|
|
|
|
return result;
|