feat: P6 외부연동 어댑터 모듈 PoC (펌뱅킹/SMS·카카오)

신규 모듈 ga-external-adapter — 외부 SDK 의존성을 격리.
실제 SDK 통합 시 이 모듈의 구현체만 교체하면 ga-api/ga-common 무변경.

- ga-common.adapter.bank: BankTransferAdapter 인터페이스 + Request/Response/Status
- ga-common.adapter.message: MessageAdapter 인터페이스 + Channel(SMS/KAKAO)/Request/Response
- ga-external-adapter: MockBankTransferAdapter / MockMessageAdapter (로그 + 마스킹)
- V82: withdraw_request.transfer_tx_id/transfer_status/transfer_at + 부분 인덱스
- ApprovalService.handleApprovalCallback(WITHDRAW) — 최종 승인 시 펌뱅킹 어댑터 호출
  - 성공: status APPROVED → SENT 전이, transfer_tx_id 영속화
  - 실패: APPROVED 유지 + fail_reason 기록 (재시도 배치는 추후)
- ApprovalService.sendStepNotification — DB 알림 외 SMS 어댑터 호출 (non-critical)
- WithdrawRequestMapper.updateTransferResult 추가
This commit is contained in:
GA Pro
2026-05-24 02:10:06 +09:00
parent c005ad705a
commit b04fa79840
17 changed files with 332 additions and 3 deletions
@@ -20,4 +20,11 @@ public interface WithdrawRequestMapper {
int markSent(@Param("requestId") Long requestId);
int markCompleted(@Param("requestId") Long requestId);
int cancel(@Param("requestId") Long requestId);
/** 펌뱅킹 어댑터 응답을 저장 (transfer_tx_id/status/at + 거래상태에 따른 status 전이). */
int updateTransferResult(@Param("requestId") Long requestId,
@Param("txId") String txId,
@Param("transferStatus") String transferStatus,
@Param("nextStatus") String nextStatus,
@Param("failReason") String failReason);
}
@@ -140,4 +140,17 @@
AND status IN ('REQUESTED', 'APPROVED')
</update>
<!-- 펌뱅킹 어댑터 응답 저장 -->
<update id="updateTransferResult">
UPDATE withdraw_request
SET transfer_tx_id = #{txId,jdbcType=VARCHAR},
transfer_status = #{transferStatus,jdbcType=VARCHAR},
transfer_at = NOW(),
status = #{nextStatus},
fail_reason = #{failReason,jdbcType=VARCHAR},
<if test="nextStatus == 'SENT'">sent_at = NOW(),</if>
updated_at = NOW()
WHERE request_id = #{requestId}
</update>
</mapper>