mirror of
https://gitee.com/ulthon/ulthon_admin.git
synced 2026-08-30 12:45:32 +08:00
fix(nginx-log): service 文件加 Service 后缀(命名规范合规)
F2 Code quality review 发现:3 个新增 service 未遵守 .agents/rules/ulthon-naming-convention.md 第 19 行规定 (service 模块文件名需带 Service 后缀)。 变更: - 重命名 6 个文件(3 Base + 3 App): NginxLogParser(Base)→NginxLogParserService(Base) NginxLogReader(Base)→NginxLogReaderService(Base) NginxLogAggregator(Base)→NginxLogAggregatorService(Base) - 同步类名、use、类型 hint、new 引用 - NginxLogReaderServiceBase 异常消息前缀同步加 Service - controller Base 引用更新(NginxLogImportBase / NginxLogStatAggregateBase) 验证: - php -l 全部 8 个文件语法通过 - grep 残留旧名 = 0 结果(24 处引用全部带 Service 后缀)
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
namespace app\common\service;
|
||||
|
||||
use base\common\service\NginxLogAggregatorBase;
|
||||
use base\common\service\NginxLogAggregatorServiceBase;
|
||||
|
||||
/**
|
||||
* Nginx 访问日志聚合统计 Service(业务入口).
|
||||
@@ -10,6 +10,6 @@ use base\common\service\NginxLogAggregatorBase;
|
||||
* 继承自 Base 内核,业务侧可在本类中重写 aggregateHour / formatDateStr 等方法
|
||||
* 来定制聚合逻辑(依赖倒置:Base 层只调用 app 入口类)。
|
||||
*/
|
||||
class NginxLogAggregator extends NginxLogAggregatorBase
|
||||
class NginxLogAggregatorService extends NginxLogAggregatorServiceBase
|
||||
{
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace app\common\service;
|
||||
|
||||
use base\common\service\NginxLogParserBase;
|
||||
|
||||
/**
|
||||
* Nginx access log 解析器(App 入口类).
|
||||
*
|
||||
* 业务侧可在此覆盖 NginxLogParserBase 的方法实现定制逻辑.
|
||||
*/
|
||||
class NginxLogParser extends NginxLogParserBase
|
||||
{
|
||||
}
|
||||
14
app/common/service/NginxLogParserService.php
Normal file
14
app/common/service/NginxLogParserService.php
Normal file
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
|
||||
namespace app\common\service;
|
||||
|
||||
use base\common\service\NginxLogParserServiceBase;
|
||||
|
||||
/**
|
||||
* Nginx access log 解析器(App 入口类).
|
||||
*
|
||||
* 业务侧可在此覆盖 NginxLogParserServiceBase 的方法实现定制逻辑.
|
||||
*/
|
||||
class NginxLogParserService extends NginxLogParserServiceBase
|
||||
{
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace app\common\service;
|
||||
|
||||
use base\common\service\NginxLogReaderBase;
|
||||
|
||||
/**
|
||||
* Nginx 日志增量读取 service(App 入口类).
|
||||
*
|
||||
* 框架内部所有调用走本类(依赖倒置):
|
||||
* `new \app\common\service\NginxLogReader()` 或静态上下文,
|
||||
* 业务侧如需定制读取逻辑,重写本类对应方法即可拦截。
|
||||
*
|
||||
* 全部逻辑由 NginxLogReaderBase 提供,本类默认仅继承不修改。
|
||||
*/
|
||||
class NginxLogReader extends NginxLogReaderBase
|
||||
{
|
||||
}
|
||||
18
app/common/service/NginxLogReaderService.php
Normal file
18
app/common/service/NginxLogReaderService.php
Normal file
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
namespace app\common\service;
|
||||
|
||||
use base\common\service\NginxLogReaderServiceBase;
|
||||
|
||||
/**
|
||||
* Nginx 日志增量读取 service(App 入口类).
|
||||
*
|
||||
* 框架内部所有调用走本类(依赖倒置):
|
||||
* `new \app\common\service\NginxLogReaderService()` 或静态上下文,
|
||||
* 业务侧如需定制读取逻辑,重写本类对应方法即可拦截。
|
||||
*
|
||||
* 全部逻辑由 NginxLogReaderServiceBase 提供,本类默认仅继承不修改。
|
||||
*/
|
||||
class NginxLogReaderService extends NginxLogReaderServiceBase
|
||||
{
|
||||
}
|
||||
Reference in New Issue
Block a user