44 lines
1.1 KiB
PHP
44 lines
1.1 KiB
PHP
<?php
|
|
|
|
namespace App\Services\Tg\Hook\Mod;
|
|
|
|
use App\Models\ArticleList as ModelArticleList;
|
|
//use App\Models\ArticleSchema as ModelArticleSchema;
|
|
use App\Services\Tg\Hook\Dog;
|
|
////use App\Services\Article\CacheTg as ServiceArticleCacheTg;
|
|
//use App\Services\Article\Schema as ServiceArticleSchema;
|
|
//use App\Services\Article\Cmd as ServiceArticleCmd;
|
|
//use App\Services\TomTool\Flow;
|
|
//use App\Services\TomTool\ThrowableHandler;
|
|
|
|
class Article extends Base {
|
|
|
|
public function __construct($aUpdate)
|
|
{
|
|
$this->oDog = new Dog(new ModelArticleList());
|
|
$this->oDog->_setDogName("ArticleList");
|
|
// $this->oDog->_setStrField(["schema"]);
|
|
$this->aUpdate = $aUpdate;
|
|
}
|
|
|
|
public function __call($sName, $aArg)
|
|
{
|
|
return $this->oDog->$sName($aArg[0]);
|
|
}
|
|
|
|
public function todayDel($aParam)
|
|
{
|
|
$sArticleCode = $aParam["aArg"][1] ?? date("Ymd");
|
|
|
|
$r = ModelArticleList::where("code", $sArticleCode)->delete();
|
|
|
|
if (!$r) {
|
|
return "删除失败";
|
|
}
|
|
|
|
return "删除成功";
|
|
}
|
|
|
|
|
|
}
|