diff --git a/app/Http/Controllers/SakaiController.php b/app/Http/Controllers/SakaiController.php index 3cdc1b95..fa74a9bd 100755 --- a/app/Http/Controllers/SakaiController.php +++ b/app/Http/Controllers/SakaiController.php @@ -303,6 +303,17 @@ class SakaiController $s = "toDone 123"; $s = "optionSet todo_show_type 1"; $s = "openRe"; + $s = "unsort"; + $s = "rag asdf"; + $s = "toDone zzz"; + $s = "toTip zsss"; + $s = "openRe"; + $s = "fire__2 2025-06-20"; + $s = "fire_toggle"; +// $s = "detail__all 1"; +// $s = "noRe"; +// $s = "rag xxx"; + // $s = "back"; // $s = "todoShowType AB"; // $s = "type todo"; diff --git a/app/Models/Book.php b/app/Models/Book.php index 6fbac515..2d44f566 100755 --- a/app/Models/Book.php +++ b/app/Models/Book.php @@ -124,10 +124,11 @@ class Book extends Model if ($oParentRag->order == "rank_todo") { $sTodoOrder = BookOption::_hit("order_rank_todo"); - $aOrder = explode(",", $sTodoOrder); + $aTodoOrder = explode(",", $sTodoOrder); + $sTodoOrder = implode(",", array_reverse($aTodoOrder)); - $oSelf = $oSelf->orderByRaw("rank IS NULL, FIELD(rank, " . $sTodoOrder . ") ".$sOrderType); - $oSelf = $oSelf->orderByRaw("fire IS NULL, fire ASC"); + $oSelf = $oSelf->orderByRaw("FIELD(rank, " . $sTodoOrder . ") DESC, (rank IS NULL) ASC"); + $oSelf = $oSelf->orderByRaw("fire DESC, (fire IS NULL) ASC"); $sOrder = "no"; $sOrderType = "asc"; diff --git a/app/Services/TG/Hook/Mod/Book.php b/app/Services/TG/Hook/Mod/Book.php index b4695d86..0a4899d0 100644 --- a/app/Services/TG/Hook/Mod/Book.php +++ b/app/Services/TG/Hook/Mod/Book.php @@ -1077,7 +1077,7 @@ class Book extends Base { } // 私有 - private function noRe() + public function noRe() { // $oBook = ModelBook::where("path", $this->sPath)->where("is_del", 0)->orderBy("no")->orderBy("updated_at", "desc")->get(); $oBook = ModelBook::_path($this->sPath, "all");