fix
This commit is contained in:
@@ -169,6 +169,10 @@ class ChapterService
|
|||||||
$strCacheKey = '';
|
$strCacheKey = '';
|
||||||
$intLifeTime = 0;
|
$intLifeTime = 0;
|
||||||
|
|
||||||
|
if (empty($arrFilter['$and'])) {
|
||||||
|
$arrFilter = [];
|
||||||
|
}
|
||||||
|
|
||||||
# cache filter
|
# cache filter
|
||||||
if ($intCacheLifeTime > 0) {
|
if ($intCacheLifeTime > 0) {
|
||||||
$strCacheKey = sprintf(
|
$strCacheKey = sprintf(
|
||||||
|
|||||||
@@ -417,7 +417,7 @@ class NovelService
|
|||||||
}
|
}
|
||||||
|
|
||||||
# n_category_sex_zh filter
|
# n_category_sex_zh filter
|
||||||
if (!empty($strNSex)) {
|
if (!empty($strKey)) {
|
||||||
|
|
||||||
$strKey = mb_substr($strKey, 0, 30);
|
$strKey = mb_substr($strKey, 0, 30);
|
||||||
$arrFilter['$and'][] = [
|
$arrFilter['$and'][] = [
|
||||||
@@ -454,6 +454,10 @@ class NovelService
|
|||||||
$strCacheKey = '';
|
$strCacheKey = '';
|
||||||
$intLifeTime = 0;
|
$intLifeTime = 0;
|
||||||
|
|
||||||
|
if (empty($arrFilter['$and'])) {
|
||||||
|
$arrFilter = [];
|
||||||
|
}
|
||||||
|
|
||||||
# cache filter
|
# cache filter
|
||||||
if ($intCacheLifeTime > 0) {
|
if ($intCacheLifeTime > 0) {
|
||||||
$strCacheKey = sprintf(
|
$strCacheKey = sprintf(
|
||||||
@@ -479,7 +483,7 @@ class NovelService
|
|||||||
);
|
);
|
||||||
|
|
||||||
$arrPager = call_user_func([$this, $Func], $arrParams, $arrSort, $arrNovel);
|
$arrPager = call_user_func([$this, $Func], $arrParams, $arrSort, $arrNovel);
|
||||||
// TODO 如果所有筛选条件是 all , 目前是返回数据是空的,应该要返回数据
|
|
||||||
$arrResult = [
|
$arrResult = [
|
||||||
'data' => $arrNovel['data'] ?? [],
|
'data' => $arrNovel['data'] ?? [],
|
||||||
'pages' => $arrNovel['pages'] ?? 0,
|
'pages' => $arrNovel['pages'] ?? 0,
|
||||||
|
|||||||
Reference in New Issue
Block a user