Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
黄成意
/
php_frq_api
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
9af9fe24
authored
Mar 04, 2021
by
朱继来
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
调整询价池
parent
20ce6f1a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
2 deletions
app/Model/InquiryModel.php
app/Model/InquiryModel.php
View file @
9af9fe24
...
@@ -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
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment