2026-06-01 22:37:41 +09:00
|
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
|
|
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
"https://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
|
|
<mapper namespace="com.sb.web.account.mapper.AccountSettingMapper">
|
|
|
|
|
|
|
|
|
|
<select id="findExpectedIncome" resultType="java.lang.Long">
|
2026-06-01 22:54:23 +09:00
|
|
|
SELECT expected_income FROM budget_income
|
|
|
|
|
WHERE member_id = #{memberId} AND `year` = #{year} AND `month` = #{month}
|
2026-06-01 22:37:41 +09:00
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<update id="upsertExpectedIncome">
|
2026-06-01 22:54:23 +09:00
|
|
|
INSERT INTO budget_income (member_id, `year`, `month`, expected_income, updated_at)
|
|
|
|
|
VALUES (#{memberId}, #{year}, #{month}, #{expectedIncome}, NOW())
|
2026-06-01 22:37:41 +09:00
|
|
|
ON DUPLICATE KEY UPDATE expected_income = #{expectedIncome}, updated_at = NOW()
|
|
|
|
|
</update>
|
|
|
|
|
|
|
|
|
|
</mapper>
|