Commit 9af9fe24 by 朱继来

调整询价池

parent 20ce6f1a
Showing with 12 additions and 2 deletions
...@@ -163,7 +163,7 @@ class InquiryModel extends Model ...@@ -163,7 +163,7 @@ class InquiryModel extends Model
if (empty($v)){ if (empty($v)){
continue; continue;
} }
$query->whereIn('a.status', [-1,1]);
switch ($k){ switch ($k){
case "inquiry_sn": case "inquiry_sn":
$query->where('a.inquiry_sn', '=', $v); $query->where('a.inquiry_sn', '=', $v);
...@@ -191,11 +191,21 @@ class InquiryModel extends Model ...@@ -191,11 +191,21 @@ class InquiryModel extends Model
} }
} }
$query->whereIn('a.status', [-1,1]);
if ($type == 1) { if ($type == 1) {
$query->whereNotIn('b.status', [-1, 5])->where('b.assign_type', 0); // 询价池需过滤已关闭、已确认、指定和领取的询价 $query->whereNotIn('b.status', [-1, 5])->where('b.assign_type', 0); // 询价池需过滤已关闭、已确认、指定和领取的询价
$time = time() - 7200; // 待报价的询价两小时后在询价池展示
$query->orWhereRaw('(lie_b.assign_type=1 and lie_b.status=1 and lie_b.create_time < '.$time.')');
} }
}); });
// dump($list->getBindings());
// dump($list->toSql());
// $tmp = str_replace('?', '"'.'%s'.'"', $list->toSql());
// $tmp = vsprintf($tmp, $list->getBindings());
// echo $tmp;
// exit;
$page = isset($input['p']) ? $input['p'] : $input['page']; $page = isset($input['p']) ? $input['p'] : $input['page'];
$list= $list->orderBy('id','desc')->paginate(@$input['limit'] ? $input["limit"] : 10, ['*'], 'p', @$page ? $page : 1)->toArray(); $list= $list->orderBy('id','desc')->paginate(@$input['limit'] ? $input["limit"] : 10, ['*'], 'p', @$page ? $page : 1)->toArray();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment