|
@ -7,9 +7,9 @@ |
|
|
select ID,POINTS,now() from epdc_user where DEL_FLAG = '0' |
|
|
select ID,POINTS,now() from epdc_user where DEL_FLAG = '0' |
|
|
</insert> |
|
|
</insert> |
|
|
<update id="updateUserPoints"> |
|
|
<update id="updateUserPoints"> |
|
|
update epdc_user set POINTS = POINTS + #{points} |
|
|
update epdc_user set POINTS = IFNULL(POINTS,0) + #{points} |
|
|
<if test="points > 0"> |
|
|
<if test="points > 0"> |
|
|
,POINTS_TOTLE = POINTS_TOTLE + #{points} |
|
|
,POINTS_TOTLE = IFNULL(POINTS_TOTLE,0) + #{points} |
|
|
</if> |
|
|
</if> |
|
|
where ID = #{userId} |
|
|
where ID = #{userId} |
|
|
</update> |
|
|
</update> |
|
|