From 437f8e2b89a18363a1073fdbb3ab99bcd840a757 Mon Sep 17 00:00:00 2001
From: “djh” <“3298565835@qq.com”>
Date: 星期一, 21 四月 2025 10:51:36 +0800
Subject: [PATCH] 危化品新版修改

---
 hazmat-system/src/main/resources/mapper/system/HzWarningMapper.xml |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/hazmat-system/src/main/resources/mapper/system/HzWarningMapper.xml b/hazmat-system/src/main/resources/mapper/system/HzWarningMapper.xml
index 0392338..0ad1055 100644
--- a/hazmat-system/src/main/resources/mapper/system/HzWarningMapper.xml
+++ b/hazmat-system/src/main/resources/mapper/system/HzWarningMapper.xml
@@ -63,7 +63,10 @@
     </select>
 
     <select id="selectWarningCount" resultType="java.lang.Integer" parameterType="java.lang.Long">
-        select count(1) from hz_warning where company_id=#{companyId} and state=0
+        select count(1) from hz_warning where  state=0
+        <if test="companyId != null">
+            and company_id=#{companyId}
+        </if>
     </select>
 
 

--
Gitblit v1.9.2