|
@@ -1380,9 +1380,13 @@ class BookController extends BaseController
|
|
$package = $request->header('x-package', '');
|
|
$package = $request->header('x-package', '');
|
|
$brand = $request->header('x-brand', '');
|
|
$brand = $request->header('x-brand', '');
|
|
$codeVersion = $request->header('x-Version', '');
|
|
$codeVersion = $request->header('x-Version', '');
|
|
|
|
+ $key = $sex . "_new";
|
|
|
|
+ if ( Utils::checkIsAudit($package, $brand, $codeVersion)){
|
|
|
|
+ $key .= "_audit";
|
|
|
|
+ }
|
|
|
|
|
|
- $result = HomeCache::getHomePageInfo($package, $sex . "_new");
|
|
|
|
- $result = null;
|
|
|
|
|
|
+ $result = HomeCache::getHomePageInfo($package,$key);
|
|
|
|
+ // $result = null;
|
|
if (is_empty($result)) {
|
|
if (is_empty($result)) {
|
|
$isAuth = check_qapp_auth($package, 0);
|
|
$isAuth = check_qapp_auth($package, 0);
|
|
//新判断: 根据包名来获取对应所需的bid
|
|
//新判断: 根据包名来获取对应所需的bid
|
|
@@ -1393,15 +1397,15 @@ class BookController extends BaseController
|
|
$package_id = 0;
|
|
$package_id = 0;
|
|
}
|
|
}
|
|
$channel = $sex == 'male' ? 1 : 2;
|
|
$channel = $sex == 'male' ? 1 : 2;
|
|
- myLog("index-recom")->info(['$package' => $package,'brand' => $brand,'code' => $codeVersion]);
|
|
|
|
|
|
+ // myLog("index-recom")->info(['$package' => $package,'brand' => $brand,'code' => $codeVersion]);
|
|
$result = $this->getRecommendBooks($package_id, $package, $channel, $isAuth, Utils::checkIsAudit($package, $brand, $codeVersion));
|
|
$result = $this->getRecommendBooks($package_id, $package, $channel, $isAuth, Utils::checkIsAudit($package, $brand, $codeVersion));
|
|
- HomeCache::setHomePageInfo($package, $sex . "_new", $result, 86400 + rand(0, 100));
|
|
|
|
|
|
+ HomeCache::setHomePageInfo($package, $key, $result, 86400 + rand(0, 100));
|
|
}
|
|
}
|
|
return response()->success($result);
|
|
return response()->success($result);
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
- private function getRecommendBooks($package_id, $package, $channel, $is_auth,$is_audit)
|
|
|
|
|
|
+ private function getRecommendBooks($package_id, $package, $channel, $is_auth,$is_audit = false)
|
|
{
|
|
{
|
|
myLog("index-recom")->info(['pack' => $package,'is_audit' => $is_audit]);
|
|
myLog("index-recom")->info(['pack' => $package,'is_audit' => $is_audit]);
|
|
if($is_audit){
|
|
if($is_audit){
|