diff --git a/app/Models/Book.php b/app/Models/Book.php index e6e30789..6fbac515 100755 --- a/app/Models/Book.php +++ b/app/Models/Book.php @@ -101,8 +101,15 @@ class Book extends Model $aTodoShowRank = explode(",", $sTodoShowRank); // $aTodoShowRank = [done]; // tomd($aTodoShowRank, 1); - $oSelf = $oSelf->whereIn("rank", $aTodoShowRank); - $oSelf = $oSelf->orWhereNull("rank"); +// $oSelf = self::where("path", $sPath)->where("is_del", $iIsDel); +// $oSelf = $oSelf->whereIn("rank", $aTodoShowRank); +// $oSelf = $oSelf->orWhereNull("rank"); +// $oSelf = self::where("path", $sPath)->where("is_del", $iIsDel); + $oSelf = $oSelf->where(function($query) use ($aTodoShowRank) { + $query->whereIn("rank", $aTodoShowRank) + ->orWhereNull("rank"); + }); + // $oSelf = $oSelf->where("rank", "!=", "done"); // $oSelf = $oSelf->where("rank", "!=", "block"); diff --git a/app/Services/TG/Hook/Mod/Book.php b/app/Services/TG/Hook/Mod/Book.php index f29a7621..b4695d86 100644 --- a/app/Services/TG/Hook/Mod/Book.php +++ b/app/Services/TG/Hook/Mod/Book.php @@ -88,6 +88,7 @@ class Book extends Base { //// 展开 系列 + // 展开所有,一层 public function e() { $is_exp = ModelBook::where("path", $this->sPath)->where("is_del", 0)->first()?->exp; @@ -101,6 +102,7 @@ class Book extends Base { return $this->openRe(); } + // 展开所有,无限 public function ee() { $is_exp = ModelBook::where("path", "like", $this->sPath."%")->where("is_del", 0)->first()?->exp; @@ -114,6 +116,7 @@ class Book extends Base { return $this->openRe(); } + // 展开no,一层 public function u($aParam) { $iNo = $aParam["aArg"][1] ?? false; @@ -133,6 +136,7 @@ class Book extends Base { } + // 展开no,无限 public function uu($aParam) { $iNo = $aParam["aArg"] ?? false;