|
@@ -85,7 +85,9 @@ class CrmBookAutoRecommendService
|
|
{
|
|
{
|
|
$value = Redis::get($this->redis_key);
|
|
$value = Redis::get($this->redis_key);
|
|
if ($value) {
|
|
if ($value) {
|
|
- return json_decode($value, true);
|
|
|
|
|
|
+ $result = json_decode($value, true);
|
|
|
|
+ if($result) return $result;
|
|
|
|
+ return $this->setRecommendBooksRedis();
|
|
} else {
|
|
} else {
|
|
return $this->setRecommendBooksRedis();
|
|
return $this->setRecommendBooksRedis();
|
|
}
|
|
}
|
|
@@ -120,5 +122,6 @@ class CrmBookAutoRecommendService
|
|
});
|
|
});
|
|
return $results;
|
|
return $results;
|
|
}
|
|
}
|
|
|
|
+ return [];
|
|
}
|
|
}
|
|
}
|
|
}
|