瀏覽代碼

Merge branch 'master' of http://git.bjzxtw.org.cn:3000/zxt/news_producer

rkljw 2 天之前
父節點
當前提交
d1e712d09f
共有 2 個文件被更改,包括 14 次插入0 次删除
  1. 13 0
      app/JsonRpc/NewsService.php
  2. 1 0
      app/JsonRpc/NewsServiceInterface.php

+ 13 - 0
app/JsonRpc/NewsService.php

@@ -6390,4 +6390,17 @@ class NewsService implements NewsServiceInterface
         }
         return Result::success($result);
     }
+    /**
+     * 获取项目详情
+     * @param array $data
+     * @return array
+     */
+    public function getProjectInfo(array $data): array
+    {
+        $project = Project::where('id', $data['id'])->first();
+        if(empty($project)){
+            return Result::error("暂无相关项目信息", 0);
+        }
+        return Result::success($project);
+    }
 }

+ 1 - 0
app/JsonRpc/NewsServiceInterface.php

@@ -431,4 +431,5 @@ interface NewsServiceInterface
     public function upProject(array $data): array;
     public function delProject(array $data): array;
     public function checkProject(array $data): array;
+    public function getProjectInfo(array $data): array;
 }