cache = Factory::cache('default'); } /** * 缓存供应商token * @param $enterpriseId * @param $supplierId * @param $token * @return bool */ public function setSupplierToken($enterpriseId, $supplierId, $token) { return $this->cache->zadd($this->SupplierToken.'::'.$enterpriseId, $supplierId, $token); } /** * 根据token获取供应商id 反解token需要 * @param $enterpriseId * @param $token * @return float */ public function getSupplierToken($enterpriseId, $token) { return $this->cache->zscore($this->SupplierToken.'::'.$enterpriseId, $token); } }