Explorar o código

wesmiler 报恩寺项目

wesmiler %!s(int64=4) %!d(string=hai) anos
pai
achega
9c1381e03a
Modificáronse 1 ficheiros con 4 adicións e 0 borrados
  1. 4 0
      app/Services/EnshrineService.php

+ 4 - 0
app/Services/EnshrineService.php

@@ -64,6 +64,10 @@ class EnshrineService extends BaseService
             ->where(['a.user_id'=> $userId])
             ->where(function ($query) use ($params) {
                 $query->where(['a.mark'=>1,'a.status'=> 1]);
+                $type = isset($params['type'])? $params['type'] : 0;
+                if($type){
+                    $query->where('a.type', $type);
+                }
 
             })
             ->select(['a.*', 'f.name','f.thumb','f.image', 'f.file_url','c.name as cate_name'])