|
@@ -50,6 +50,7 @@ class CrmBooklistController extends Controller
|
|
$this->channel_id = $user->channel_id;
|
|
$this->channel_id = $user->channel_id;
|
|
$month = date('n');
|
|
$month = date('n');
|
|
$category_id = $request->get('category_id', 0);
|
|
$category_id = $request->get('category_id', 0);
|
|
|
|
+ $books = [];
|
|
if ($category_id) {
|
|
if ($category_id) {
|
|
$booklists = (new CrmBookAutoRecommendService)->getRecommendBooksFromRedis();
|
|
$booklists = (new CrmBookAutoRecommendService)->getRecommendBooksFromRedis();
|
|
$books = collect($booklists)->where('category_id', $category_id)->transform(function ($item) {
|
|
$books = collect($booklists)->where('category_id', $category_id)->transform(function ($item) {
|
|
@@ -62,7 +63,6 @@ class CrmBooklistController extends Controller
|
|
);
|
|
);
|
|
return $item;
|
|
return $item;
|
|
})->all();
|
|
})->all();
|
|
- \Log::info($books);
|
|
|
|
}
|
|
}
|
|
return view('crm.booklist',compact('books', 'month'));#->with(compact('books', 'month'));
|
|
return view('crm.booklist',compact('books', 'month'));#->with(compact('books', 'month'));
|
|
}
|
|
}
|