<?php
namespace Redis\Db4;

/**
 * 店铺销量前三商品列表缓存
 * User: liuyuzhen
 * Date: 2018/5/31
 * Time: 15:03
 * Description:
 */
class StoreTopSaleGoodsRedisModel extends \Redis\Db4\AbstractModel {
    /**
     * 表名
     *
     * @var string
     */
    protected $_tableName = 'han_store_top_sale_goods';


    public function tableCacheGet($id){
        $result = $this->get($this->calcKey($id));
        return $result;
    }
    public function tableCacheSet($id,$data,$experio){
        $res=$this->set($this->calcKey($id), $data,$experio);
        return $res;
    }
    /**
     * 类实例
     *
     */
    private static $_instance = null;

    /**
     * 获取类实例
     */
    public static function getInstance() {
        if (!(self::$_instance instanceof self)) {
            self::$_instance = new self();
        }

        return self::$_instance;
    }

}