Example #1
0
 /**
  * 从缓存中调用 还车门店营业时间
  * @param $json_params
  * @return bool|string
  */
 public static function DropOffOpenTimeRedis($json_params)
 {
     $Redis = YiiRedis::getInstance();
     $redisKey = 'dropOffOpenTime_' . md5($json_params);
     if ($Redis->get($redisKey)) {
         $Rs = $Redis->get($redisKey);
     } else {
         $Rs = RcManager::DropOffOpenTimeRQ($json_params);
         $Rs_array = json_decode($Rs, true);
         if ($Rs_array['status']) {
             $Redis->set($redisKey, $Rs, 60 * 60 * 24 * 30);
             //30d
         }
     }
     return $Rs;
 }