getDbConnection()->createCommand("select count(*) as count from pack_product_task where status=1 and school_id={$schoolId}")->queryRow(); $pages['total']=$totalQuery['count']; $pages['totalPage']=ceil($totalQuery['count']/$pageLimit); $pages['page']=$page; $data = $this->getDbConnection()->createCommand(" select * from pack_product_task where school_id={$schoolId} and status=1 order by create_time desc limit {$offset},{$pageLimit} ")->queryAll(); $return['pages']=$pages; $return['dataList']=$data; return $return; } }