示例#1
0
 function act_getAccountListByPlatform()
 {
     $pid = !empty($_POST['platformId']) ? $_POST['platformId'] : 0;
     $accountList = omAccountModel::accountListByPid($pid);
     if (!$accountList) {
         self::$errCode = 400;
         self::$errMsg = "没取到对应账号列表!";
         return $accountList;
     } else {
         self::$errCode = 200;
         self::$errMsg = "获取到账号列表!";
         return $accountList;
     }
 }
示例#2
0
 function act_getAccountListByPid($PlatformId)
 {
     global $memc_obj;
     $cacheName = md5("om_system_account_" . $PlatformId);
     $list = $memc_obj->get_extral($cacheName);
     if ($list) {
         return json_encode($list);
     } else {
         $accountList = omAccountModel::accountListByPid($PlatformId);
         if (!$accountList) {
             self::$errCode = 101;
             self::$errMsg = "没取到账号列表!";
             return;
         } else {
             $isok = $memc_obj->set_extral($cacheName, $accountList);
             if (!$isok) {
                 self::$errCode = 102;
                 self::$errMsg = 'memcache缓存账号信息出错!';
                 return json_encode($accountList);
             }
             return json_encode($accountList);
         }
     }
 }
示例#3
0
 public function act_changeplatformId()
 {
     $platformId = $_REQUEST['platformId'];
     $accountList = omAccountModel::accountListByPid($platformId);
     //var_dump($accountList);
     if ($accountList) {
         return $accountList;
     } else {
         self::$errCode = '998';
         self::$errMsg = '无法取到对应平台的账号信息';
         return false;
     }
 }