cqp 3 недель назад
Родитель
Сommit
e78444db72
1 измененных файлов с 3 добавлено и 2 удалено
  1. 3 2
      app/Service/ItemService.php

+ 3 - 2
app/Service/ItemService.php

@@ -58,11 +58,12 @@ class ItemService extends Service
         if(! empty($data['code'])) $model->where('code', 'LIKE', '%'.$data['code'].'%');
         if(isset($data['state'])) $model->where('state', $data['state']);
 
-        return $model;
+        return [true , $model];
     }
 
     public function itemGannetList($data,$user){
-        $model = $this->itemGannetCommon($data, $user);
+        list($status, $model) = $this->itemGannetCommon($data, $user);
+        if(! $status) return [false, $model];
         $list = $model->get()->toArray();
         $list = $this->fillItemGannetList($list);