<?php
namespace Admin\Controller;
class MemberCustomerVisitorController extends BaseController
{
    public function _initialize()
    {
        parent::_initialize();
    }
    public function index()
    {
        $param=I('param.');
        $customer_id=I('id');
        $map=array();
        if($customer_id){
            $map['customer_id']=$customer_id;
        }
        if($param['shop_id']){
            $map['shop_id']=$param['shop_id'];
        }
        if(!empty($param['begin_time']))$map['addtime'][]=array('egt',strtotime($param['begin_time']));
        if(!empty($param['end_time']))$map['addtime'][]=array('elt',strtotime($param['end_time']));
        $list=$this->lists('MemberCustomerVisitor',$map,'id desc');
        $shop_list=M('Shops')->where($map)->field('id,name,status')->select();
        $this->assign('shop_list',$shop_list);
    	$this->assign('list',$list);
        $this->assign($param);
    	$this->display();
    }

}
?>