优化
This commit is contained in:
@@ -18,20 +18,10 @@ use Throwable;
|
||||
*/
|
||||
abstract class AetherCrudService extends AetherService implements AetherCrudInterface
|
||||
{
|
||||
#[Inject]
|
||||
protected LoggerFactory $loggerFactory;
|
||||
|
||||
protected LoggerInterface $logger;
|
||||
|
||||
protected array $search = [];
|
||||
|
||||
protected array $ignoreSearchFields = [];
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->logger = $this->loggerFactory->get($this->getLoggerName());
|
||||
}
|
||||
|
||||
/**
|
||||
* 通用列表查询(支持分页和树形结构).
|
||||
*/
|
||||
@@ -85,7 +75,6 @@ abstract class AetherCrudService extends AetherService implements AetherCrudInte
|
||||
*/
|
||||
public function detail(int $id): object
|
||||
{
|
||||
$this->logger->info('获取资源详情', ['id' => $id]);
|
||||
return $this->getModel()->findOrFailById($id);
|
||||
}
|
||||
|
||||
@@ -262,14 +251,6 @@ abstract class AetherCrudService extends AetherService implements AetherCrudInte
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取日志名称.
|
||||
*/
|
||||
protected function getLoggerName(): string
|
||||
{
|
||||
return strtolower((new ReflectionClass($this))->getShortName());
|
||||
}
|
||||
|
||||
protected function getSearch(): array
|
||||
{
|
||||
return $this->search;
|
||||
|
||||
Reference in New Issue
Block a user