ipaylinks 列表top

feature/trippest
lyt 7 years ago
parent 8b439fe8ee
commit 7e0e2d60ff

@ -122,8 +122,9 @@ class Note_model extends CI_Model {
}
public function get_list() {
$this->topnum ? $sql = "SELECT TOP " . $this->topnum : $sql = "SELECT ";
$sql .= "
// $this->topnum ? $sql = "SELECT TOP " . $this->topnum : $sql = "SELECT ";
$this->topnum ? $top_sql = " TOP " . $this->topnum : $top_sql = " ";
$sql = "SELECT $top_sql
pn.*
FROM IPayLinksLog pn
WHERE 1=1
@ -133,14 +134,16 @@ class Note_model extends CI_Model {
$this->search
$this->dealId
UNION ALL
select * from InfoManager.dbo.IPayLinksLog ipl2
select $top_sql * from InfoManager.dbo.IPayLinksLog ipl2
where 1=1
and ipl2.IPL_payType='refund'
and ipl2.IPL_stateCode=2
$this->send
$this->search
$this->dealId
$this->orderby
";
$query = $this->INFO->query($sql);
if ($this->topnum === 1) {
if ($query->num_rows() > 0) {

Loading…
Cancel
Save