Эх сурвалжийг харах

修改获取某个任务规则联合查询

15313670163 4 сар өмнө
parent
commit
69e64ad8c4

+ 1 - 1
app/JsonRpc/CollectorService.php

@@ -272,7 +272,7 @@ class CollectorService implements CollectorServiceInterface
      */
     public function getOneRule(array $data): array
     {
-        $result = Rule::where('id',$data['id'])->first();
+        $result = Rule::withCount(relations:'arts')->where('id',$data['id'])->first();
         if(empty($result)){
             return Result::error('请输入正确的规则任务id!');