<?php
/**
 * 查询充值订单处理情况
 * User: yzxh24
 * Date: 11-9-28
 * Time: 上午11:04
 * To change this template use File | Settings | File Templates.
 */
class QueryAction extends PayAction
{
    public function run()
    {
        $id = S::gp('id', 'G', 2);
        $order = $this->db()->select()->from(YeeOrder::table())->where(array('id'=>$id))->find(true);
        if (empty($order))
        {
            throw new iSystemException('这条充值记录不属于你，不能查看');
        }
        if ($this->uid() != $order['uid'])
        {
            throw new iSystemException('这条充值记录不属于你，不能查看');
        }

        $this->getController()->render('query', array('order'=>$order));
    }
}