Example #1
0
 public function query($type, $fromMoney, $toMoney)
 {
     if ($type) {
         $datas = RentModel::where('genre', 1)->where('del', 0)->where('type', $type)->where('money', '>', $fromMoney)->where('money', '<', $toMoney)->orderBy('sort', 'desc')->orderBy('id', 'desc')->paginate($this->limit);
     } else {
         $datas = RentModel::where('genre', 1)->where('del', 0)->where('money', '>', $fromMoney)->where('money', '<', $toMoney)->orderBy('sort', 'desc')->orderBy('id', 'desc')->paginate($this->limit);
     }
     $datas->limit = $this->limit;
     return $datas;
 }
Example #2
0
 public function query($genre)
 {
     if ($genre == 1) {
         //视频需求,type==1、3是需求
         $datas = GoodsModel::whereIn('type', [1, 3])->where('isshow', 1)->where('isshow2', 1)->where('del', 0)->orderBy('sort', 'desc')->orderBy('id', 'desc')->paginate($this->limit);
     } elseif ($genre == 2) {
         //创意剧本,genre==2是需求
         $datas = IdeasModel::where('genre', 2)->where('isshow', 1)->where('del', 0)->orderBy('sort', 'desc')->orderBy('id', 'desc')->paginate($this->limit);
     } elseif ($genre == 3) {
         //分镜需求,genre==2是需求
         $datas = StoryBoardModel::where('genre', 2)->where('isshow', 1)->where('isshow2', 1)->where('del', 0)->orderBy('sort', 'desc')->orderBy('sort2', 'desc')->orderBy('id', 'desc')->paginate($this->limit);
     } elseif ($genre == 4) {
         //演员需求,genre==2是需求
         $datas = EntertainModel::where('genre', 2)->where('del', 0)->orderBy('sort', 'desc')->orderBy('id', 'desc')->paginate($this->limit);
     } elseif ($genre == 5) {
         //设备需求,genre==2是需求
         $datas = RentModel::where('genre', 2)->where('del', 0)->orderBy('sort', 'desc')->orderBy('id', 'desc')->paginate($this->limit);
     } elseif ($genre == 6) {
         //设计需求,genre==2是需求
         $datas = DesignModel::where('genre', 2)->where('del', 0)->orderBy('sort', 'desc')->orderBy('id', 'desc')->paginate($this->limit);
     }
     $datas->limit = $this->limit;
     return $datas;
 }
Example #3
0
 /**
  * 获取租赁信息
  */
 public function getRents($limit)
 {
     return RentModel::where('del', 0)->orderBy('sort', 'desc')->orderBy('id', 'desc')->paginate($limit);
 }
Example #4
0
 /**
  * 查询方法
  */
 public function query($del, $genre, $type)
 {
     if ($genre) {
         $datas = RentModel::where('del', $del)->where('genre', $genre)->where('type', $type)->orderBy('id', 'desc')->paginate($this->limit);
     } else {
         $datas = RentModel::where('del', $del)->where('genre', $genre)->orderBy('id', 'desc')->paginate($this->limit);
     }
     $datas->limit = $this->limit;
     return $datas;
 }
Example #5
0
 /**
  * 查询方法
  */
 public function query($del = 0)
 {
     $datas = RentModel::where('del', $del)->orderBy('id', 'desc')->paginate($this->limit);
     $datas->limit = $this->limit;
     return $datas;
 }