完成动态删除功能

This commit is contained in:
KilLze
2025-12-18 21:11:45 +08:00
parent c01824513b
commit 84e8fe4ff6
7 changed files with 48 additions and 2 deletions

View File

@@ -3,9 +3,9 @@ server:
spring:
datasource:
url: jdbc:mysql://114.55.250.24:3306/dating?useUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=GMT%2B8
url: jdbc:mysql://110.42.41.177:3306/dating?useUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=GMT%2B8
username: root
password: rJ6DBTYrFCpjdsxy2sBV
password: JoyeeServe2025
driver-class-name: com.mysql.cj.jdbc.Driver
# MyBatis 配置

View File

@@ -27,4 +27,8 @@
#{isPublic}, 0, 0, #{createdAt}, #{updatedAt})
</insert>
<delete id="deletePostById" parameterType="int">
DELETE FROM post WHERE post_id = #{postId}
</delete>
</mapper>