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]); } public function Clone($aParam) { // list(, $iNodeId) = explode(" ", $sText, 2); $iNodeId = $aParam['aArg'][1]; $oHttp = new Http(); $oHttp->sMethod = "post"; $oHttp->sToUrl = $_ENV['baseUrl']."/api/tg/node/".$iNodeId."/copy"; $oHttp->bIsJson = true; $oHttp->aData = [ 'chatId' => $aParam['aOther']['chatId'], 'fromId' => $aParam['aOther']['fromId'] ]; $r = @json_decode($oHttp->send(), true); if ($r["ret"] == 1) { // $sMessage = "成功"; } else { $sMessage = "失败"; return $sMessage; } $id = ModelNode::where("type", 1)->orderBy("id", "desc")->first()?->id; $aParam = []; $aParam["aArg"][1] = $id; return $this->find($aParam); } }