From 2419f5b2f83ce47a1df1ea9af2990ddc0bcd562a Mon Sep 17 00:00:00 2001 From: liurunyu <lry9898@163.com> Date: 星期一, 16 十二月 2024 11:05:25 +0800 Subject: [PATCH] 临时任务功能相关数据库操作代码增加事务注解 --- pipIrr-platform/pipIrr-web/pipIrr-web-temp/src/main/java/com/dy/pipIrrTemp/changeSome/ChSomeIntakeAmountSv.java | 10 +++++++--- 1 files changed, 7 insertions(+), 3 deletions(-) diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-temp/src/main/java/com/dy/pipIrrTemp/changeSome/ChSomeIntakeAmountSv.java b/pipIrr-platform/pipIrr-web/pipIrr-web-temp/src/main/java/com/dy/pipIrrTemp/changeSome/ChSomeIntakeAmountSv.java index fcebfd9..b430a8e 100644 --- a/pipIrr-platform/pipIrr-web/pipIrr-web-temp/src/main/java/com/dy/pipIrrTemp/changeSome/ChSomeIntakeAmountSv.java +++ b/pipIrr-platform/pipIrr-web/pipIrr-web-temp/src/main/java/com/dy/pipIrrTemp/changeSome/ChSomeIntakeAmountSv.java @@ -130,7 +130,7 @@ } @Transactional - int doUpdateOneIntakeAmountDay(Long id, Double amount){ + protected int doUpdateOneIntakeAmountDay(Long id, Double amount){ return dao.updateOneIntakeAmountDay(id, amount); } @@ -164,6 +164,7 @@ * 鍒犻櫎鎵�鏈夊彇姘村彛鏈堝彇姘撮噺缁熻 * @throws Exception */ + @Transactional public void deleteAllIntakeAmountMonth(){ dao.deleteAllIntakeAmountMonth(); } @@ -197,7 +198,8 @@ } } } - private void doStatisticsIntakeAmountMonth(int year, int month, List<StIntakeAmountMonth> list) throws Exception{ + @Transactional + protected void doStatisticsIntakeAmountMonth(int year, int month, List<StIntakeAmountMonth> list) throws Exception{ if(list != null && list.size() > 0){ for(StIntakeAmountMonth po : list){ po.year = year ; @@ -217,6 +219,7 @@ * 鍒犻櫎鎵�鏈夊彇姘村彛骞村彇姘撮噺缁熻 * @throws Exception */ + @Transactional public void deleteAllIntakeAmountYear(){ dao.deleteAllIntakeAmountYear(); } @@ -238,7 +241,8 @@ this.doStatisticsIntakeAmountYear(year, list) ; } } - private void doStatisticsIntakeAmountYear(int year, List<StIntakeAmountYear> list) throws Exception{ + @Transactional + protected void doStatisticsIntakeAmountYear(int year, List<StIntakeAmountYear> list) throws Exception{ if(list != null && list.size() > 0){ for(StIntakeAmountYear po : list){ po.year = year ; -- Gitblit v1.8.0