diff --git a/src/Services/Tg/Hook/Mod/Ann.php b/src/Services/Tg/Hook/Mod/Ann.php index 72819381a..0e5225493 100644 --- a/src/Services/Tg/Hook/Mod/Ann.php +++ b/src/Services/Tg/Hook/Mod/Ann.php @@ -98,6 +98,28 @@ class Ann extends Base { return $this->find($aParam); } + public function dateNow($aParam) + { + $iId = $aParam["aArg"][1] ?? false; + + if (!$iId) { + return "需要id"; + } + + if (!$iId == "?") { + return "dateNow [id]"; + } + + $oAnn = ModelAnn::where("id", $iId)->first(); + + if (!$oAnn) { + return "没有这个"; + } + + $oAnn->date = date("Y-m-d H:i:s"); + return $oAnn->save(); + } + public function findPin() { $iPinId = ModelAnn::where("sort", ">", 0)->where("status", 1)->orderBy("sort", "desc")->first()?->id;