where($promoteMap)->getField('id', true); $promoteIds[] = $promoteId; $map['promote_id'] = ['in', $promoteIds]; } } $data = M('pay_info', 'tab_')->where($map)->order('id DESC')->page($p, $row)->select(); $count = M('pay_info', 'tab_')->where($map)->count(); $page = set_pagination($count, $row); if ($page) { $this->assign('_page', $page); } $this->assign('startDate', $startDate); $this->assign('endDate', $endDate); $this->assign('data', $data); $this->display('index'); } }