no message

This commit is contained in:
hellcat 2025-12-01 20:59:49 +08:00
parent 0af0b912db
commit 24520c08d2
2 changed files with 40 additions and 2 deletions

View File

@ -33,12 +33,18 @@ class Node extends Base
$r = @json_decode($oHttp->send(), true);
if ($r["ret"] == 1) {
$sMessage = "成功";
// $sMessage = "成功";
} else {
$sMessage = "失败";
return $sMessage;
}
return $sMessage;
$id = ModelNode::where("type", 1)->orderBy("id", "desc")->first()?->id;
$aParam = [];
$aParam["aArg"][1] = $id;
return $this->find($aParam);
}

View File

@ -0,0 +1,32 @@
<?php
namespace App\Services\Tg\Hook\Mod;
use App\Models\Node as ModelNode;
use App\Services\Tg\Hook\Dog;
class NodeDog extends Base {
private $oDog;
public function __construct($aUpdate)
{
$this->oDog = new Dog(new ModelNode());
$this->oDog->_setDogName("node"); // 必须me用正常就是类名只不过后期没准改名所以就这里写死
// $this->oDog->_setPrimaryKey("code"); // 可选默认id
// $this->oDog->_setStrField(["content"]); // 可选,指定长文本字段
$this->oDog->_setOutFormat([
// "create_time" => "date",
// "update_time" => "date",
]);
}
public function __call($sName, $aArg)
{
return $this->oDog->$sName($aArg[0]);
}
}