feat: 투자 매매내역 수정 API (PUT /trades/{id})
CI / build (push) Failing after 15m14s

- InvestController/Service/Mapper: updateTrade 추가
- 수정 결과를 시점별로 시뮬레이션해 보유수량이 음수가 되면 거부(매도 과다 방지)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
ByungCheol
2026-06-06 16:42:33 +09:00
parent a9ff2387c8
commit eded44a476
4 changed files with 62 additions and 0 deletions
@@ -87,6 +87,13 @@
VALUES (#{memberId}, #{holdingId}, #{tradeType}, #{tradeDate}, #{quantity}, #{price}, #{fee}, NOW())
</insert>
<update id="updateTrade" parameterType="com.sb.web.account.domain.InvestTrade">
UPDATE invest_trade
SET trade_type = #{tradeType}, trade_date = #{tradeDate},
quantity = #{quantity}, price = #{price}, fee = #{fee}
WHERE id = #{id} AND member_id = #{memberId}
</update>
<delete id="deleteTrade">
DELETE FROM invest_trade WHERE id = #{id} AND member_id = #{memberId}
</delete>