From 09ee5added9d59e90310a2586e846137ea597b19 Mon Sep 17 00:00:00 2001
From: LSH
Date: 星期五, 01 十二月 2023 13:15:42 +0800
Subject: [PATCH] #

---
 src/main/resources/mapper/CompanyMoneyMapper.xml |   12 ++++++++++--
 1 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/src/main/resources/mapper/CompanyMoneyMapper.xml b/src/main/resources/mapper/CompanyMoneyMapper.xml
index a80459d..2b6062a 100644
--- a/src/main/resources/mapper/CompanyMoneyMapper.xml
+++ b/src/main/resources/mapper/CompanyMoneyMapper.xml
@@ -31,13 +31,17 @@
     <select id="selectMoneyReceivablesAll" resultType="java.lang.Double">
         select sum(receivables) receivables from man_company_money
         where year(create_time) = #{year}
-        and user_id = #{userId}
+        <if test="userId != null">
+            and user_id = #{userId}
+        </if>
     </select>
 
     <select id="selectMoneyActualReceiptsAll" resultType="java.lang.Double">
         select sum(actual_receipts) actualReceipts from man_company_money
         where year(create_time) = #{year}
-        and user_id = #{userId}
+        <if test="userId != null">
+            and user_id = #{userId}
+        </if>
     </select>
 
     <select id="selectMoneyCopyAll" resultMap="BaseResultMap">
@@ -48,4 +52,8 @@
         update man_company_money_copy set status2 = 1 where id = #{id}
     </update>
 
+    <update id="updateMoneyCopyByid2">
+        update man_company_money_copy set status2 = 2 where id = #{id}
+    </update>
+
 </mapper>

--
Gitblit v1.9.1