protected function orderConversations($sn, $lastId) { $oc = new Model_OrderConversation(); $lastId = intval($lastId); return $oc->fetchPagedList(1, 999999, array(Db::RAW_WHERE_KEY => 'id>' . $lastId, 'sn' => $sn), 'id ASC')['rows']; }
public function orderConversationAction() { $this->view->sn = $sn = trim($this->_getParam('sn', '')); $lastId = intval(trim($this->_getParam('lastId', 0))); $getConversation = $this->_getParam('getConversation'); if (empty($getConversation)) { return; } $oc = new Model_OrderConversation(); $lastId = intval($lastId); $result = $oc->fetchPagedList(1, 999999, array(Db::RAW_WHERE_KEY => 'id>' . $lastId, 'sn' => $sn), 'id ASC')['rows']; $arp = new AjaxResponse(); $arp->setStatus(AjaxResponse::STATUS_OK); $arp->setMessage($result); $this->json($arp); }