feat(wallet): 대출 월 상환금(loan_payment) 필드 추가
Deploy / deploy (push) Failing after 13m41s

- 원리금균등 상환표를 은행 조회액과 정확히 맞추기 위한 고정 월 상환금 선택 저장
- wallet.loan_payment 컬럼(ALTER IF NOT EXISTS), 도메인·DTO·매퍼 반영

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
sb
2026-07-07 23:07:49 +09:00
parent 646d5f53fa
commit ee2bc08b1e
6 changed files with 11 additions and 4 deletions
+1
View File
@@ -33,6 +33,7 @@ ALTER TABLE wallet ADD COLUMN IF NOT EXISTS loan_method VARCHAR(20) NULL COMME
ALTER TABLE wallet ADD COLUMN IF NOT EXISTS loan_months INT NULL COMMENT '대출기간(개월)';
ALTER TABLE wallet ADD COLUMN IF NOT EXISTS loan_start DATE NULL COMMENT '대출시작일';
ALTER TABLE wallet ADD COLUMN IF NOT EXISTS loan_amount BIGINT NULL COMMENT '대출 실행 금액(원금, 처음 빌린 금액)';
ALTER TABLE wallet ADD COLUMN IF NOT EXISTS loan_payment BIGINT NULL COMMENT '월 상환금(고정, 원리금균등) — 은행 조회액과 맞추기 위한 선택 입력';
-- 계좌번호 암호화 저장(AES-GCM)으로 평문보다 길어 VARCHAR(255) 필요 — 운영 적용 완료(CREATE TABLE 정의에 반영).
-- 매 기동 MODIFY 는 라이브 테이블 락 위험이 있어 제거. 기존 환경 확장이 필요하면 1회 수동 적용:
-- ALTER TABLE wallet MODIFY account_number VARCHAR(255) NULL;
+5 -4
View File
@@ -20,6 +20,7 @@
<result property="loanMethod" column="loan_method"/>
<result property="loanMonths" column="loan_months"/>
<result property="loanStart" column="loan_start"/>
<result property="loanPayment" column="loan_payment"/>
<result property="sortOrder" column="sort_order"/>
<result property="createdAt" column="created_at"/>
<result property="updatedAt" column="updated_at"/>
@@ -27,7 +28,7 @@
<sql id="cols">id, member_id, type, name, issuer, account_number, card_type,
opening_balance, opening_date, current_value,
loan_amount, loan_rate, loan_method, loan_months, loan_start,
loan_amount, loan_rate, loan_method, loan_months, loan_start, loan_payment,
sort_order, created_at, updated_at</sql>
<select id="findByMember" parameterType="long" resultMap="walletResultMap">
@@ -45,12 +46,12 @@
useGeneratedKeys="true" keyProperty="id">
INSERT INTO wallet (member_id, type, name, issuer, account_number, card_type,
opening_balance, opening_date, current_value,
loan_amount, loan_rate, loan_method, loan_months, loan_start,
loan_amount, loan_rate, loan_method, loan_months, loan_start, loan_payment,
sort_order, created_at, updated_at)
VALUES (#{memberId}, #{type}, #{name}, #{issuer},
#{accountNumber, typeHandler=com.sb.web.common.crypto.EncryptedStringTypeHandler}, #{cardType},
#{openingBalance}, #{openingDate}, #{currentValue},
#{loanAmount}, #{loanRate}, #{loanMethod}, #{loanMonths}, #{loanStart},
#{loanAmount}, #{loanRate}, #{loanMethod}, #{loanMonths}, #{loanStart}, #{loanPayment},
#{sortOrder}, NOW(), NOW())
</insert>
@@ -63,7 +64,7 @@
current_value = #{currentValue},
loan_amount = #{loanAmount},
loan_rate = #{loanRate}, loan_method = #{loanMethod},
loan_months = #{loanMonths}, loan_start = #{loanStart}
loan_months = #{loanMonths}, loan_start = #{loanStart}, loan_payment = #{loanPayment}
WHERE id = #{id} AND member_id = #{memberId}
</update>