<?php
namespace Smi\Controller;
use Think\Controller;
header("Content-Type:text/html;CharSet=UTF-8");
class StoreRenewController extends BaseController
{
	/**
	 * [renewList 商家续费记录]
	 * @date        2017-06-22
	 */
	//商家续费记录列表
	public function storeRenewList()
    {
        $Model = M("stores_renew");
        $count = $Model->count();
        $Page = new \Think\Page($count, 10);//每页记录数
        $show = $Page->show();// 分页显示输出
        $list = $Model
        		->join("sr LEFT JOIN `am_stores` s ON sr.`store_id`=s.`id`")
        		->join("LEFT JOIN am_region_county c ON s.county_id=c.id")          
            	->field("sr.id AS id,sr.sn AS sn,c.name AS county,s.name AS name,s.contact AS contact,s.mobile AS mobile,sr.sn AS sn,sr.money AS money,sr.continue_time AS continue_time,sr.status AS status,sr.exp_date AS exp_date,sr.create_time AS create_time")
            	->order("sr.id desc")
            	->select();
            	// dump($list);die;
        $this->assign('page', $show);// 赋值分页输出
        $this->assign("list", $list);//定义变量并显示模板
        $this->display();
    }

}