wesmiler 13 ساعت پیش
والد
کامیت
3f6b2c4e24
2فایلهای تغییر یافته به همراه2 افزوده شده و 12 حذف شده
  1. 1 5
      app/Http/Controllers/Admin/GoodsCategoryController.php
  2. 1 7
      app/Services/Common/GoodsCategoryService.php

+ 1 - 5
app/Http/Controllers/Admin/GoodsCategoryController.php

@@ -58,11 +58,7 @@ class GoodsCategoryController extends Backend
      */
     public function edit()
     {
-        if ($this->service->edit()) {
-            return message($this->service->getError() ?: '操作成功', true);
-        } else {
-            return message($this->service->getError() ?: '操作失败', false);
-        }
+        $this->service->edit();
     }
 
     /**

+ 1 - 7
app/Services/Common/GoodsCategoryService.php

@@ -153,13 +153,7 @@ class GoodsCategoryService extends BaseService
         }
 
         // 保存数据
-        $result = $this->model->edit($param);
-        if (!$result) {
-            $this->error = '操作失败';
-            return false;
-        }
-
-        return true;
+        return parent::edit($param);
     }
 
     /**