Przeglądaj źródła

refactor(lakala): 更新日志服务并移除自定义Log类

- 将SixShop\Lakala\Log替换为think\Log以使用框架内置日志
- 移除自定义Log类文件及其相关依赖引用
- 简化TransactionService中的多余模型导入
- 统一日志处理方式以便更好地集成框架功能
runphp 1 miesiąc temu
rodzic
commit
7d295477d0
3 zmienionych plików z 2 dodań i 23 usunięć
  1. 0 15
      src/Log.php
  2. 1 3
      src/Service/NotifyService.php
  3. 1 5
      src/Service/TransactionService.php

+ 0 - 15
src/Log.php

@@ -1,15 +0,0 @@
-<?php
-declare(strict_types=1);
-
-namespace SixShop\Lakala;
-
-use SixShop\System\ExtensionManager;
-use think\App;
-
-class Log extends \SixShop\System\Log
-{
-    public function __construct(App $app, private ExtensionManager $extensionManager)
-    {
-        parent::__construct($app, $extensionManager, Extension::EXTENSION_ID);
-    }
-}

+ 1 - 3
src/Service/NotifyService.php

@@ -3,13 +3,11 @@ declare(strict_types=1);
 namespace SixShop\Lakala\Service;
 
 use SixShop\Lakala\Config;
-use SixShop\Lakala\Log;
+use think\Log;
 use SixShop\Lakala\OpenAPISDK\V3\Api\LakalaNotifyApi;
-use SixShop\Lakala\OpenAPISDK\V3\Model\ModelTradeNotify;
 use SixShop\Lakala\PaymentProvider;
 use SixShop\Payment\Enum\PaymentStatusEnum;
 use SixShop\Payment\Model\ExtensionPaymentModel;
-use function SixShop\Core\error_response;
 use function SixShop\Core\throw_logic_exception;
 
 class NotifyService

+ 1 - 5
src/Service/TransactionService.php

@@ -3,17 +3,13 @@ declare(strict_types=1);
 
 namespace SixShop\Lakala\Service;
 
-use SixShop\Lakala\Log;
+use think\Log;
 use SixShop\Lakala\OpenAPISDK\V3\Api\LakalaApi;
 use SixShop\Lakala\OpenAPISDK\V3\Api\QueryTradequeryApi;
 use SixShop\Lakala\OpenAPISDK\V3\Api\TransPreorderApi;
-use SixShop\Lakala\OpenAPISDK\V3\Configuration;
 use SixShop\Lakala\OpenAPISDK\V3\Model\ModelRequest;
 use SixShop\Lakala\OpenAPISDK\V3\Model\QueryTradequeryRequest;
 use SixShop\Lakala\OpenAPISDK\V3\Model\TradeAccBusiFields;
-use SixShop\Lakala\OpenAPISDK\V3\Model\TradePreorderWechaAccBusiFields;
-use SixShop\Lakala\OpenAPISDK\V3\Model\TradePreorderWechaDetail;
-use SixShop\Lakala\OpenAPISDK\V3\Model\TradePreorderWechaGoodsDetail;
 use SixShop\Lakala\OpenAPISDK\V3\Model\TransPreorderRequest;
 use SixShop\Lakala\Config;
 use SixShop\Lakala\Dto\LocationInfo;