This commit is contained in:
Default
2025-04-18 16:02:44 +08:00
parent 7db551a21b
commit 3e4ec4b1cb
14 changed files with 829 additions and 44 deletions

View File

@@ -97,6 +97,7 @@ class CategoryModel extends MongoModel
return self::$arrCategory;
}
/**
* Undocumented function
*

View File

@@ -209,6 +209,40 @@ class ChapterModel extends MongoModel
return $arrResult;
}
/**
* Undocumented function
*
* @param array $arrFilter
* @param integer $intCount
* @param array $arrSort
* @param array $arrOptions
* @param boolean $boolReadContent
* @return null|array
*/
public function findManyShuffledWithCache(
array $arrFilter,
int $intCount = 0,
array $arrSort = ['c_sort_num' => -1],
string $strKey = '',
int $intLifeTime = 24 * 3600,
bool $boolReadContent = false
): null|array {
$arrResult = $this->checkCacheByKey($strKey);
if ($arrResult !== NULL) {
return $arrResult;
}
if (empty($arrOptions)) {
$arrOptions = self::$arrChapterOptions;
}
$arrResult = $this->findMany($arrFilter, $intCount, $arrSort, [], $boolReadContent);
$this->setCacheByKey($strKey, $arrResult, $intLifeTime);
return $arrResult;
}
/**
* Undocumented function
*

View File

@@ -204,7 +204,7 @@ class GanRaoMaModel extends MongoModel
* @param string $strPageCode 视图编码
* @param string $strDifference 差异
* @param int $intNum 生成数量
* @return string
* @return array
*/
static public function getGrmCode($strDomain, $strPageCode, $strDifference, $intNum)
{

View File

@@ -149,7 +149,6 @@ class NovelModel extends MongoModel
}
}
/**
* find one novel
*