no message
This commit is contained in:
parent
81732bffbe
commit
38764c17ce
@ -84,9 +84,12 @@ EOL;
|
||||
|
||||
$jobs->smtpClearDayCount(); // 重置stmp的day_count
|
||||
|
||||
//// *start 邮件报表
|
||||
$jobs->mailLogReport();
|
||||
$jobs->vcodeReport(); // 每日验证码注册率报表
|
||||
$jobs->mailMustReport(); // 每日mailMust报表 - 需在重置之前
|
||||
$jobs->mailMust_reset_month(); // 每天8点,check重置mailMust的month_count
|
||||
//// *end 邮件报表
|
||||
|
||||
// 每日清除前一天残留TgStep
|
||||
$jobs->clearTgStep();
|
||||
|
||||
@ -60,6 +60,25 @@ use App\Services\TomTool\Telegram\Slave as TeleSlave;
|
||||
final class Cron
|
||||
{
|
||||
|
||||
// maillog报表(监控title)
|
||||
public static function mailLogReport()
|
||||
{
|
||||
$cMailLogCount = ModelMailLog::select('title', DB::raw('count(*) as total'))
|
||||
->groupBy('title')
|
||||
->orderBy('total', 'desc')
|
||||
->get();
|
||||
|
||||
$sMsg = "\n====== ".$_ENV["site_code"]."发送邮件标题统计 ======";
|
||||
foreach ($cMailLogCount as $oMailLogCount) {
|
||||
$sMsg .= "\n".$oMailLogCount->title.":".$oMailLogCount->total;
|
||||
}
|
||||
|
||||
TeleSlave::notify()->enableDetail(false)->send($sMsg);
|
||||
|
||||
echo "\nmailLogReport - ok";
|
||||
|
||||
}
|
||||
|
||||
// 必达邮件报表 - 必须在重置之前调用
|
||||
public static function mailMustReport()
|
||||
{
|
||||
|
||||
26
src/Services/Tg/Hook/Mod/MailMust.php
Normal file
26
src/Services/Tg/Hook/Mod/MailMust.php
Normal file
@ -0,0 +1,26 @@
|
||||
<?php
|
||||
|
||||
namespace App\Services\Tg\Hook\Mod;
|
||||
|
||||
use App\Models\MailMust as ModelMailMust;
|
||||
use App\Services\Tg\Hook\Dog;
|
||||
|
||||
class MailMust extends Base {
|
||||
|
||||
private $oDog;
|
||||
|
||||
public function __construct($aUpdate)
|
||||
{
|
||||
|
||||
$this->oDog = new Dog(new ModelMailMust());
|
||||
$this->oDog->_setDogName("mailMust"); // 必须,me用,正常就是类名,只不过后期没准改名,所以就这里写死
|
||||
// $this->oDog->_setPrimaryKey("code"); // 可选,默认id
|
||||
// $this->oDog->_setStrField(["content"]); // 可选,指定长文本字段
|
||||
}
|
||||
|
||||
public function __call($sName, $aArg)
|
||||
{
|
||||
return $this->oDog->$sName($aArg[0]);
|
||||
}
|
||||
|
||||
}
|
||||
@ -49,6 +49,27 @@ final class Test extends Base
|
||||
return $this->cron($aParam);
|
||||
}
|
||||
|
||||
public function t2()
|
||||
{
|
||||
$path = "assets/baba/default_files/img_barbar/_hua.svg";
|
||||
|
||||
if (!file_exists($path)) return 'null';
|
||||
|
||||
$svgContent = file_get_contents($path);
|
||||
// 关键:先转成 base64 字符串
|
||||
$base64 = base64_encode($svgContent);
|
||||
|
||||
$sizeInBytes = strlen($base64);
|
||||
|
||||
// 转换为 KB
|
||||
$sizeInKB = $sizeInBytes / 1024;
|
||||
|
||||
echo "Base64 字符串大小: " . round($sizeInKB, 2) . " KB";
|
||||
|
||||
// 拼接 Data URI 头部
|
||||
// return 'data:image/svg+xml;base64,' . $base64;
|
||||
}
|
||||
|
||||
public function t1()
|
||||
{
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user