no message
This commit is contained in:
parent
66a11bfac3
commit
e3fe894106
@ -98,6 +98,28 @@ class Ann extends Base {
|
|||||||
return $this->find($aParam);
|
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()
|
public function findPin()
|
||||||
{
|
{
|
||||||
$iPinId = ModelAnn::where("sort", ">", 0)->where("status", 1)->orderBy("sort", "desc")->first()?->id;
|
$iPinId = ModelAnn::where("sort", ">", 0)->where("status", 1)->orderBy("sort", "desc")->first()?->id;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user