post_rating
Change-Id: Ia1a6fb3f87b793a6307046e36951c1fb36b213c8
diff --git a/src/main/resources/mapper/PostRatingMapper.xml b/src/main/resources/mapper/PostRatingMapper.xml
new file mode 100644
index 0000000..097eeb8
--- /dev/null
+++ b/src/main/resources/mapper/PostRatingMapper.xml
@@ -0,0 +1,5 @@
+<insert id="insertOrUpdate">
+ INSERT INTO post_ratings (user_id, post_id, rating)
+ VALUES (#{userId}, #{postId}, #{rating})
+ ON DUPLICATE KEY UPDATE rating = VALUES(rating)
+</insert>
\ No newline at end of file