From 189849927e37278c8bc03202bd714aca7a0f8f7d Mon Sep 17 00:00:00 2001
From: heheng <475597332@qq.com>
Date: 星期三, 10 十二月 2025 11:10:03 +0800
Subject: [PATCH] 修改功能

---
 multi-system/src/main/java/com/gkhy/exam/system/service/impl/AnnualMaintenanceEvaluateServiceImpl.java |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/multi-system/src/main/java/com/gkhy/exam/system/service/impl/AnnualMaintenanceEvaluateServiceImpl.java b/multi-system/src/main/java/com/gkhy/exam/system/service/impl/AnnualMaintenanceEvaluateServiceImpl.java
index 0515c09..0177157 100644
--- a/multi-system/src/main/java/com/gkhy/exam/system/service/impl/AnnualMaintenanceEvaluateServiceImpl.java
+++ b/multi-system/src/main/java/com/gkhy/exam/system/service/impl/AnnualMaintenanceEvaluateServiceImpl.java
@@ -6,6 +6,7 @@
 import com.gkhy.exam.common.api.CommonPage;
 import com.gkhy.exam.common.api.CommonResult;
 import com.gkhy.exam.common.constant.UserConstant;
+import com.gkhy.exam.common.exception.ApiException;
 import com.gkhy.exam.common.utils.PageUtils;
 import com.gkhy.exam.common.utils.SecurityUtils;
 import com.gkhy.exam.system.domain.AnnualMaintenanceEvaluate;
@@ -83,7 +84,7 @@
                             .in(AnnualMaintenanceEvaluateDevice::getId, evaluateDeviceIds)
             );
             if (update <= 0){
-                throw new RuntimeException("保存年度基础设施维护计划设备失败");
+                throw new ApiException("保存年度基础设施维护计划设备失败");
             }
         }
 
@@ -96,7 +97,7 @@
             });
             int insert = annualMaintenanceEvaluateDeviceMapper.batchInsert(addData);
             if (insert <= 0){
-                throw new RuntimeException("保存年度基础设施维护计划设备失败");
+                throw new ApiException("保存年度基础设施维护计划设备失败");
             }
         }
 
@@ -108,7 +109,7 @@
             });
             int update = annualMaintenanceEvaluateDeviceMapper.batchUpdate(updateData);
             if (update <= 0){
-                throw new RuntimeException("保存年度基础设施维护计划设备失败");
+                throw new ApiException("保存年度基础设施维护计划设备失败");
             }
         }
     }
@@ -145,7 +146,7 @@
                             .set(AnnualMaintenanceEvaluateDevice::getUpdateTime, LocalDateTime.now())
                             .set(AnnualMaintenanceEvaluateDevice::getUpdateBy, SecurityUtils.getUsername()));
             if (update1 <= 0){
-                throw new RuntimeException("删除年度基础设施维护计划设备失败");
+                throw new ApiException("删除年度基础设施维护计划设备失败");
             }
             return CommonResult.success("删除成功");
         }

--
Gitblit v1.9.2