INSERT INTO user_behavior (user_id, product_id, behavior_type, score) VALUES (#{userId}, #{productId}, #{behaviorType}, #{score}) UPDATE user_behavior SET score = #{score}, create_time = NOW() WHERE id = #{id}