From 23181e9f08ed9a366dd28ba4e70bba79f93c936d Mon Sep 17 00:00:00 2001 From: Jerry Yan <792602257@qq.com> Date: Tue, 18 Nov 2025 14:42:20 +0800 Subject: [PATCH] =?UTF-8?q?fix(video):=20=E5=AE=8C=E5=96=84=E8=A7=86?= =?UTF-8?q?=E9=A2=91=E5=88=A0=E9=99=A4=E9=80=BB=E8=BE=91=E4=BB=A5=E6=8E=92?= =?UTF-8?q?=E9=99=A4=E8=A2=AB=E8=AF=84=E4=BB=B7=E7=9A=84=E8=A7=86=E9=A2=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 修改删除条件,增加对视频评价关联表的检查 - 确保已被评价的视频不会被误删 - 防止因外键约束导致的删除失败问题 --- src/main/resources/mapper/VideoMapper.xml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/resources/mapper/VideoMapper.xml b/src/main/resources/mapper/VideoMapper.xml index b2373b25..7bacfd97 100644 --- a/src/main/resources/mapper/VideoMapper.xml +++ b/src/main/resources/mapper/VideoMapper.xml @@ -73,6 +73,8 @@ delete from video where id not in ( select video_id from member_video where video_id is not null + ) and id not in ( + select video_id from video_review where video_id is not null )