70 lines
2.2 KiB
PHP
70 lines
2.2 KiB
PHP
<?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(true)->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);
|
||
}
|
||
|
||
}
|