dd/app/Services/Tg/Hook/Mod/Dev.php
2025-11-14 14:21:27 +08:00

70 lines
2.2 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?php
namespace App\Services\Tg\Hook\Mod;
use App\Models\BladeJctj as ModelBladeJctj;
use App\Services\Tg\Hook\Dog;
use App\Services\TomTool\Flow;
use App\Services\TomTool\HttpV2;
use App\Services\Article;
use App\Services\SlaveMap;
use App\Services\ArticleCmd;
use App\Services\TomTool\Telegram\Slave as TeleSlave;
class Dev extends Base {
private $oDog;
public function __construct($aUpdate)
{
$this->oDog = new Dog(new ModelBladeJctj());
$this->oDog->_setDogName("jctj"); // 必须me用正常就是类名只不过后期没准改名所以就这里写死
$this->oDog->_setPrimaryKey("id"); // 可选默认id
$this->oDog->_setStrField(["content"]); // 可选,指定长文本字段
}
public function __call($sName, $aArg)
{
return $this->oDog->$sName($aArg[0]);
}
public function test2()
{
// $r = TeleSlave::warn()->enableSlaveQueue(false)->send("xxxx");
$r = TeleSlave::warn()->enableSlaveQueue(false)->send("mmmmmmm");
return $r->getResult();
}
public function test1()
{
// $oArticleCmd = new ArticleCmd("ffq_tg::20251028163931");
// $r = ArticleCmd::make("ffq_tg::20251028163931")->reset();
// $r = ArticleCmd::start("ffq_tg::20251028163931")->setSiteGroupCode("cp-a")->setSiteCode("ttcp")->save("zzz", "xxx");
// $r = ArticleCmd::start("ffq_tg::20251028163931")->setSiteGroupCode("cp-a")->set("qusi", "buyao");
$r = ArticleCmd::start("ffq_tg::20251028163931")->moveToLog("|cp-a|ttcp|20251101182406|");
// $r = ArticleCmd::start("ffq_tg::20251028163931")->setCmd("ooo")->reset();
// $r = ArticleCmd::start("ffq_tg::20251028163931")->clear();
// $r = ArticleCmd::start("ffq_tg::20251028163931")->set("aaa", 111);
tomd($r, 1);
exit;
// $oArticle = new Article();
$r = SlaveMap::siteTreeByArticleGroup("ffq_tg_a");
tomd($r, 1);
exit;
$oArticle = new Article();
$r = $oArticle->syncChange("ffq_tg::20251029190433", "new");
tomd($r, 1);
}
}