public function getChargeRecode($strCpid, $strExorderNo, $strSign) { $strChargeRecordHost = $g_arr_host['chargerecod_host']; $strData = 'cpid=' . $strCpid . '&exorderno=' . $strExorderNo . '&sign=' . $strSign; $result = get_respond_by_url($strChargeRecordHost, $strData); $jsonCharge = stripslashes($result); $arrChargeRecord = json_decode($result, true); if (!isset($arrChargeRecord['retcode'])) { Log::write('CharegeDb::getChargeRecode() failed result:' . $result, 'log'); return false; } $nRetcode = $arrChargeRecord['retcode']; if ($nRetcode == 1) { Log::write('CharegeDb::getChargeRecode() there is no record', 'log'); return false; } $nRetcode = $arrChargeRecord['retcode']; if ($nRetcode == 2) { Log::write('CharegeDb::getChargeRecode() other error', 'log'); return false; } $this->_chargeRecord->setChargeRecord($arrChargeRecord); $bResult = $this->recordCharge(); if ($bResult) { Log::write('CharegeDb::getChargeRecode():recordCharge()', 'log'); return false; } return true; }
private function _luceneCoolshow($nCoolType, $strKeyWord) { try { $coolshow = CoolShowFactory::getCoolShow($nCoolType); $this->_setCoolShowParam($coolshow); $data = $coolshow->getLuceneParam($nCoolType, $strKeyWord); $result = $this->_getMem()->getSearchResult($data . 'forweb'); if ($result) { // Log::write('CoolShowSearch::_luceneCoolshow():getSearchResult()'.$sql, 'log'); return $result; } $jsonResult = get_respond_by_url(YL_SEARCH_LUCENE_URL, $data); // Log::write('CoolShowSearch::_luceneCoolshow() data:'.$data, 'debug'); // Log::write('CoolShowSearch::_luceneCoolshow() jsonResult:'.$jsonResult, 'debug'); $arrResult = json_decode($jsonResult, true); $arrCoolshow = array(); if (!is_array($arrResult)) { Log::write('CoolShowSearch::_luceneCoolshow():get_respond_by_url() failed', 'log'); return false; } foreach ($arrResult as $content) { array_push($arrCoolshow, json_decode($content['content'], true)); } $arrProtocol = $coolshow->getWebProtocol($arrCoolshow); if ($arrProtocol === false) { Log::write('CoolShowSearch::_luceneCoolshow():getWebProtocol() failed', 'log'); return false; } $this->_getMem()->setSearchResult($data . 'forweb', $arrProtocol, 12 * 60 * 60); return $arrProtocol; } catch (Exception $e) { Log::write("CoolShowSearch::_luceneCoolshow(): excepton error:" . $e->getMessage(), "log"); return false; } }