From d18c0bde988f8501ba84600f9d3d02f676a881e8 Mon Sep 17 00:00:00 2001
From: yaozc <unbelievers@yeah.net>
Date: Mon, 20 Mar 2023 03:07:10 +0000
Subject: [PATCH] 强制更新的临时对应。

---
 eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/capitalFlow/repository/CapitalFlowExpendRepository.java |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/capitalFlow/repository/CapitalFlowExpendRepository.java b/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/capitalFlow/repository/CapitalFlowExpendRepository.java
index b77b839..25f9423 100644
--- a/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/capitalFlow/repository/CapitalFlowExpendRepository.java
+++ b/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/capitalFlow/repository/CapitalFlowExpendRepository.java
@@ -19,6 +19,7 @@
 import org.apache.poi.hpsf.Decimal;
 import org.springframework.data.jpa.repository.JpaRepository;
 import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
+import org.springframework.data.jpa.repository.Modifying;
 import org.springframework.data.jpa.repository.Query;
 
 import java.math.BigDecimal;
@@ -44,4 +45,9 @@
      */
     @Query(value = "SELECT SUM(amount) FROM capital_flow_expend WHERE flow_id = ?1", nativeQuery = true)
     BigDecimal sumAmountByFlowId(Long flowId);
+
+    // 根据流水id删除数据
+    @Modifying
+    @Query(value = "delete from capital_flow_expend where flow_id = ?1",nativeQuery = true)
+    void deleteByFlowId(Long flowId);
 }
\ No newline at end of file

--
Gitblit v1.9.3