From fc2b307e9d3d67fd0ba8abb041bc3d1e42464409 Mon Sep 17 00:00:00 2001
From: jiawen <1845253678@qq.com>
Date: Mon, 29 Apr 2019 08:29:18 +0800
Subject: [PATCH] 产品列表调试

---
 api/wxapp/controller/ProductController.php | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/api/wxapp/controller/ProductController.php b/api/wxapp/controller/ProductController.php
index 1a0208c..e0f2c09 100644
--- a/api/wxapp/controller/ProductController.php
+++ b/api/wxapp/controller/ProductController.php
@@ -61,6 +61,9 @@ class ProductController extends RestBaseController
         $per_page = $data['per_page'] ? : config('per_page');
         $condition['p.type'] = 1;//上架产品
         $condition['c.user_id'] = $data['user_id'];
+        if ($data['company']) {
+            $condition['p.job'] = $data['company'];
+        }
         if ($data['policy']) {
             $condition['p.policy'] = $data['policy'];
         }
@@ -74,7 +77,7 @@ class ProductController extends RestBaseController
             ->where($condition)
             ->field('p.id,p.name,p.logo,p.upper_limit,p.lower_limit,p.rate,p.loan_time,p.loan_period,c.company')
             ->order('p.create_time desc')
-            ->paginate($per_page);
+            ->select(false);
         if ($result === false) {
             $this->error(['code'=>'40000','msg'=>'获取失败']);
         }
--
libgit2 0.24.0