} //echo " $limit $page" ,print_r($sort); $skip = $page < 1 ? 0 : ($page - 1) * $limit; //持仓处理 $chich = $this->getParam('chich'); if ($chich) { $unidf = $this->getParam('unidf'); //use sidx // $sortf = $this->getParam('sortf'); // $sort = array($datef=>-1); $numf = $this->getParam('numf'); $skip = 0; $limit = 100000; //全部 } $c = $mon->findByIndex($coll, (object) $cond, $limit, $skip, array(), (object) $sort, true); $collconf = $show_config[$coll]; while ($row = $c->getNext()) { if ($chich) { $unid = $row[$unidf]; if ($unid && $appeared[$unid] < 1) { $appeared[$unid] = 1; if ($row[$numf] > 0) { $rows[] = $row; } } } else { $rows[] = $row; } } $records = $c->count();