SELECT replace(uuid(),'-','') AS ID INSERT INTO user_point_total ( id, user_id, customer_id, used_point, usable_point, total_point, created_by, created_time, updated_by, updated_time ) VALUE ( #{id}, #{userId}, #{customerId}, #{usedPoint}, #{usablePoint}, #{totalPoint}, #{createdBy}, now(), #{createdBy}, now() ) ON DUPLICATE KEY UPDATE USED_POINT = (USED_POINT + #{usedPoint}), USABLE_POINT = (USABLE_POINT + #{usablePoint}), TOTAL_POINT = (TOTAL_POINT + #{totalPoint}), UPDATED_TIME = NOW(), UPDATED_BY = #{createdBy}