Пример #1
0
 /**
  * 查询账户关系表(支持缓存)
  * @param $accountId
  * @param string $site
  */
 public static function getAccountMapping($accountId, $site = '', $isCache = true)
 {
     $data = array();
     if ($isCache) {
         $strCacheKey = 'ballance_log_job_accountid_new_' . $accountId . '_site_' . $site;
         $objMem = APF_Cache_Factory::get_instance()->get_memcache();
         $data = $objMem->get($strCacheKey);
     }
     if (!$data) {
         $data = Model_Payment_AccountMapping::getAccountMapping($accountId, $site);
         if ($isCache && $data) {
             $objMem->set($strCacheKey, $data, 0, 86400);
         }
     }
     return $data;
 }