<?php
include_once dirname(__FILE__) . '/../main.php';

$params = query_paras();

$uid = $params['date']['uid'];
$zoneid = $params['date']['zoneid'];//1:经验；2：金币；3钻石
$type = $params['date']['type'];
$date = $params['date']['ts'];

$sqlName = "tab_userbaseParams";

$arr = daoInst()->select("*")->from($sqlName)
        ->where('type')->eq($type)
        ->andWhere('zoneid')->eq($zoneid)
        ->andWhere('uid')->eq($uid)
        ->fetchAll();

$result = new stdClass();
$result->data = $arr;
$result->err = 0;
/*
$key = "userbaseParams-".$uid."-".$zoneid;

$num = gMem()->llen($key);
$arr = gMem()->lrange($key, 0, $num);
$resultArr = array();
foreach ($arr as $item) {
    if($item->type == $type){
        $resultArr[] = $item;
    }
}
*/
echo json_encode($result);
