feat(point): 게시판 포인트 정책 개편
Deploy / deploy (push) Failing after 12m48s

작성: 10P, 일 50P 한도(5회), 스팸 키워드 포함 시 미지급
추천 받음(작성자): +5P, 일 50P 한도
비추천 받음(작성자): -1P
남의 글 추천(투표자): +1P, 일 10P 한도
추천 취소(투표자): -1P
addPoints에 GREATEST(0,...) 적용 — 잔액 음수 방지
This commit is contained in:
ByungCheol
2026-07-05 12:34:50 +09:00
parent d65dd88bba
commit 32da57e0e0
3 changed files with 109 additions and 17 deletions
+1 -1
View File
@@ -14,7 +14,7 @@
</insert>
<update id="addPoints">
UPDATE member SET points = points + #{amount}, updated_at = NOW() WHERE id = #{memberId}
UPDATE member SET points = GREATEST(0, points + #{amount}), updated_at = NOW() WHERE id = #{memberId}
</update>
<select id="getPoints" parameterType="long" resultType="long">