コード例 #1
0
ファイル: index.php プロジェクト: BGCX067/ezboss-svn-to-git
 /** 
  * 查询用户账户充值历史
  * @param $userId
  * @param $perPage
  * @param $currPage
  * 返回json数据
  */
 public function querryUserRechargeHistory($userId, $perPage, $currPage)
 {
     $ip = new IPFilter(getonlineip());
     if ($ip->isAllowable() != 1) {
         return json_encode(lang('ip_denied'));
     }
     $account = new Account($userId);
     $rechargeHistory = new RechargeHistory($account->accountId);
     return json_encode($rechargeHistory->getHistoryList($perPage, $currPage));
 }
コード例 #2
0
ファイル: test.php プロジェクト: BGCX067/ezboss-svn-to-git
echo "<br>";
//测试用户账户充值  单位人民币分
$res = $account->addBalance("10", "2");
echo "addBalance=" . $res;
echo "<br>";
$res = $account->buy("100004", "1", "1");
echo "buy=" . $res;
echo "<br>";
$res = $account->getServiceTime("100003");
echo "getServiceTime=" . $res;
echo "<br>";
$res = $account->isInService("100003");
echo "isInService=" . $res;
echo "<br>";
//测试查询产品列表
echo "<br>productList->getProducts-----------------------<br>";
$productList = new ProductList();
$res = $productList->getProducts();
print_r($res);
echo "<br>";
echo "<br>rechargeHistory->getHistoryList-----------------------<br>";
//测试查询账户历史
$rechargeHistory = new RechargeHistory($account->accountId);
$res = $rechargeHistory->getHistoryList("10", "1");
print_r($res);
echo "<br>";
//测试查询测试查询交易历史
echo "<br>transactionHistory->getHistoryList-----------------------<br>";
$transactionHistory = new TransactionHistory($account->accountId);
$res = $transactionHistory->getHistoryList("10", "1");
print_r($res);