正在显示
1 个修改的文件
包含
4 行增加
和
1 行删除
@@ -61,6 +61,9 @@ class ProductController extends RestBaseController | @@ -61,6 +61,9 @@ class ProductController extends RestBaseController | ||
61 | $per_page = $data['per_page'] ? : config('per_page'); | 61 | $per_page = $data['per_page'] ? : config('per_page'); |
62 | $condition['p.type'] = 1;//上架产品 | 62 | $condition['p.type'] = 1;//上架产品 |
63 | $condition['c.user_id'] = $data['user_id']; | 63 | $condition['c.user_id'] = $data['user_id']; |
64 | + if ($data['company']) { | ||
65 | + $condition['p.job'] = $data['company']; | ||
66 | + } | ||
64 | if ($data['policy']) { | 67 | if ($data['policy']) { |
65 | $condition['p.policy'] = $data['policy']; | 68 | $condition['p.policy'] = $data['policy']; |
66 | } | 69 | } |
@@ -74,7 +77,7 @@ class ProductController extends RestBaseController | @@ -74,7 +77,7 @@ class ProductController extends RestBaseController | ||
74 | ->where($condition) | 77 | ->where($condition) |
75 | ->field('p.id,p.name,p.logo,p.upper_limit,p.lower_limit,p.rate,p.loan_time,p.loan_period,c.company') | 78 | ->field('p.id,p.name,p.logo,p.upper_limit,p.lower_limit,p.rate,p.loan_time,p.loan_period,c.company') |
76 | ->order('p.create_time desc') | 79 | ->order('p.create_time desc') |
77 | - ->paginate($per_page); | 80 | + ->select(false); |
78 | if ($result === false) { | 81 | if ($result === false) { |
79 | $this->error(['code'=>'40000','msg'=>'获取失败']); | 82 | $this->error(['code'=>'40000','msg'=>'获取失败']); |
80 | } | 83 | } |
-
请 注册 或 登录 后发表评论