Ver código fonte

select res_type

visuddhinanda 1 ano atrás
pai
commit
c24764ebbf

+ 2 - 2
app/Http/Controllers/DiscussionCountController.php

@@ -143,7 +143,7 @@ class DiscussionCountController extends Controller
         }
         }
         Log::debug('res id',['res'=>$resId]);
         Log::debug('res id',['res'=>$resId]);
         //全部资源id获取完毕
         //全部资源id获取完毕
-        $table = Discussion::select(['id','res_id','type','editor_uid'])
+        $table = Discussion::select(['id','res_id','res_type','type','editor_uid'])
                             ->where('status','active')
                             ->where('status','active')
                             ->whereNull('parent')
                             ->whereNull('parent')
                             ->whereIn('res_id',$resId);
                             ->whereIn('res_id',$resId);
@@ -169,7 +169,7 @@ class DiscussionCountController extends Controller
         $allDiscussions = Discussion::where('status','active')
         $allDiscussions = Discussion::where('status','active')
                                     ->whereNull('parent')
                                     ->whereNull('parent')
                                     ->where('res_id',$resId)
                                     ->where('res_id',$resId)
-                                    ->select(['id','res_id','type','editor_uid'])
+                                    ->select(['id','res_id','res_type','type','editor_uid'])
                                     ->get();
                                     ->get();
         $result = DiscussionCountResource::collection($allDiscussions);
         $result = DiscussionCountResource::collection($allDiscussions);
         Log::debug('response',['data'=>$result]);
         Log::debug('response',['data'=>$result]);