From edcf6923186682c678969c68ceda27257e8c8978 Mon Sep 17 00:00:00 2001
From: 云 <2163098428@qq.com>
Date: 星期四, 04 六月 2026 15:57:49 +0800
Subject: [PATCH] fix(account): 修复库存记录ID查询条件语法错误

---
 src/main/resources/mapper/account/purchase/AccountPaymentApplicationMapper.xml |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/src/main/resources/mapper/account/purchase/AccountPaymentApplicationMapper.xml b/src/main/resources/mapper/account/purchase/AccountPaymentApplicationMapper.xml
index c7acd28..8f180a4 100644
--- a/src/main/resources/mapper/account/purchase/AccountPaymentApplicationMapper.xml
+++ b/src/main/resources/mapper/account/purchase/AccountPaymentApplicationMapper.xml
@@ -87,12 +87,14 @@
     </select>
 
     <select id="existsByStockInRecordId" resultType="java.lang.Boolean">
-         SELECT COUNT(*) > 0
+        SELECT COUNT(*) > 0
         FROM account_payment_application
-        WHERE  status != 2
-        <foreach collection="stockInRecordIds" item="id" open="(" separator=" OR " close=")">
-          and  FIND_IN_SET(#{id}, stock_in_record_ids)
+        WHERE status != 2
+        AND (
+        <foreach collection="stockInRecordIds" item="id" separator=" OR ">
+            FIND_IN_SET(#{id}, stock_in_record_ids) > 0
         </foreach>
+        )
     </select>
 
 </mapper>

--
Gitblit v1.9.3