public function priceAction()
 {
     $prices = Application_Model_M_GlobalConsultationPrice::fetchByStatus(1);
     if (count($prices) > 0) {
         $out['errno'] = '0';
         $personal = array();
         $company = array();
         $opinion = array();
         foreach ($prices as $price) {
             $res = array('title' => $price->getTitle(), 'content' => $price->getContent());
             if ($price->getType() == 1) {
                 array_push($personal, $res);
             } elseif ($price->getType() == 2) {
                 array_push($company, $res);
             } elseif ($price->getType() == 3) {
                 array_push($opinion, $res);
             } else {
             }
         }
         $out['personal'] = $personal;
         $out['company'] = $company;
         $out['opinion'] = $opinion;
     } else {
         $out['errno'] = '1';
     }
     $out['msg'] = Yy_ErrMsg_Diagnosis::getMsg('price', $out['errno']);
     Yy_Utils::jsonOut($out);
 }
 public function pricedelAction()
 {
     $this->getResponse()->setHeader('Content-Type', 'application/json');
     $this->_helper->viewRenderer->setNoRender(true);
     $this->_helper->layout()->disableLayout();
     $id = $this->_getParam('id');
     try {
         Application_Model_M_GlobalConsultationPrice::delById($id);
         $out['errno'] = "0";
     } catch (Zend_Db_Exception $e) {
         $out['errno'] = "1";
     }
     Yy_Utils::jsonOut($out);
 }
 public function delete()
 {
     $where = 'id=' . $this->getId();
     return Application_Model_M_GlobalConsultationPrice::delete($where);
 }