From 30805f3e30d31a1cbf94f51302686c39d0e4f06a Mon Sep 17 00:00:00 2001
From: Jerry Yan <792602257@qq.com>
Date: Wed, 24 Sep 2025 17:50:53 +0800
Subject: [PATCH] =?UTF-8?q?refactor(mapper):=E4=BC=98=E5=8C=96=E6=9F=A5?=
=?UTF-8?q?=E8=AF=A2=E9=80=BB=E8=BE=91=E5=B9=B6=E5=A4=84=E7=90=86=E7=A9=BA?=
=?UTF-8?q?=E5=88=97=E8=A1=A8=E6=83=85=E5=86=B5?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
- 将 filterExistingRelations 查询中的 if 判断替换为 choose-when 结构
- 在 otherwise 分支中添加空结果集查询,避免空列表时 SQL 异常- 统一 filterValidSourceRelations 查询结构,增强代码一致性
-修正 foreach 标签中 UNION ALL 前后的空格问题,确保 SQL 语法正确- 提升 XML 映射文件的可读性和健壮性
---
src/main/resources/mapper/SourceMapper.xml | 154 ++++++++++++---------
1 file changed, 92 insertions(+), 62 deletions(-)
diff --git a/src/main/resources/mapper/SourceMapper.xml b/src/main/resources/mapper/SourceMapper.xml
index 0d874610..088a57cc 100644
--- a/src/main/resources/mapper/SourceMapper.xml
+++ b/src/main/resources/mapper/SourceMapper.xml
@@ -17,73 +17,103 @@
insert source_watermark(source_id, face_id, watermark_type, watermark_url)