From a66b19e1c09201a922735c2325ca04df7fe544af Mon Sep 17 00:00:00 2001
From: zhangc <zc@123>
Date: 星期二, 14 一月 2025 14:57:58 +0800
Subject: [PATCH] 空校验;提高代码的健壮性

---
 src/main/java/com/zy/system/controller/PermissionController.java |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/main/java/com/zy/system/controller/PermissionController.java b/src/main/java/com/zy/system/controller/PermissionController.java
index e712016..3a9971e 100644
--- a/src/main/java/com/zy/system/controller/PermissionController.java
+++ b/src/main/java/com/zy/system/controller/PermissionController.java
@@ -58,7 +58,7 @@
     @ManagerAuth
     public R edit(Permission permission) {
         if (Cools.isEmpty(permission)){
-            return R.error();
+            return R.error("鍙傛暟缂哄け");
         }
         if (null == permission.getId()){
             permissionService.insert(permission);
@@ -79,7 +79,7 @@
     @ManagerAuth
     public R update(Permission permission){
         if (Cools.isEmpty(permission) || null==permission.getId()){
-            return R.error();
+            return R.error("鍙傛暟缂哄け");
         }
         permissionService.updateById(permission);
         return R.ok();
@@ -89,7 +89,7 @@
     @ManagerAuth
     public R delete(Integer[] ids){
         if (Cools.isEmpty(ids)){
-            return R.error();
+            return R.error("鍙傛暟缂哄け");
         }
         permissionService.deleteBatchIds(Arrays.asList(ids));
         return R.ok();

--
Gitblit v1.9.1