Jelajahi Sumber

修改删除底部导航

15313670163 1 bulan lalu
induk
melakukan
38419a8b7b
1 mengubah file dengan 2 tambahan dan 0 penghapusan
  1. 2 0
      app/JsonRpc/FooterService.php

+ 2 - 0
app/JsonRpc/FooterService.php

@@ -9,6 +9,7 @@ use App\Model\Web;
 use Hyperf\RpcServer\Annotation\RpcService;
 use App\Tools\Result;
 use Hyperf\DbConnection\Db;
+use PhpParser\Node\Expr\Clone_;
 
 #[RpcService(name: "FooterService", protocol: "jsonrpc-http", server: "jsonrpc-http")]
 class FooterService implements FooterServiceInterface
@@ -132,6 +133,7 @@ class FooterService implements FooterServiceInterface
         try{
             $footer_category = FooterCategory::where('id', $data['id'])->first();
             if (!$footer_category) {
+                Db::rollBack();
                 return Result::error("该底部导航不存在!");
             }else{
                 $result['footer_category'] = FooterCategory::where('id', $data['id'])->delete();