<?php
/** Pad会员控制器
 * @Copyright (C) 2016 汉潮 All rights reserved.
 * @License http://www.hanchao9999.com
 * @Author ziyi <ziyi@206207038.com>
 */

namespace Pad\Controller;
use Common\Controller\HanchaoController;
class ShopLogController extends BaseController {
    public function _initialize(){
        parent::_initialize ();
    }
    public function money_list(){
        $return=array('status'=>3,'msg'=>'');
        $paramdata = I('param.');
        $list=D('App/ShopbalanceLog')->money_list($paramdata);
        if($list){$return['status']=1; $return['data'] = $list;}
        else{$return=array('status'=>2,'msg'=>'暂无数据');}
        $this->ajaxReturn($return);
    }
    public function bill(){
        $return=array('status'=>3,'msg'=>'');
        $paramdata = I('param.');
        $sid=$paramdata['sid'];
        $auth_code='bill_list';
        $return=D("Pad/ShopsRoleAuth")->check_auth_code($auth_code,$paramdata);
        if($return['status']==1) {
            $result=D('App/ShopbalanceLog')->bill($paramdata);
        }
        if($result['status']){
            $return['status']=1;
            $return['info']['shop_name']=$result['shop_name'];
            $return['info']['thumb']=$result['thumb'];
            $return['info']['income7']=$result['income7'];
            $return['info']['incomem']=$result['incomem'];
            $return['info']['td_income']=$result['td_income'];
            $return['chart']['income']=$result['income'];
            $return['chart']['min']=$result['min'];
            $return['chart']['day_array']=$result['day_array'];
            $return['chart']['step']=$result['step'];
            $return['chart']['max']=$result['max'];
            $return['chart']['chartData']=$result['chartData'];
        }else{$return=array('status'=>2,'msg'=>'暂无数据');}
        $this->ajaxReturn($return);
    }
}