Explorar el Código

feat: EK-3320: [Order List]新增发票功能.

kevin hace 1 mes
padre
commit
8541e5c816
Se han modificado 2 ficheros con 3 adiciones y 3 borrados
  1. 1 1
      common/libs/export/BaseExport.php
  2. 2 2
      console/controllers/ShopController.php

+ 1 - 1
common/libs/export/BaseExport.php

@@ -1536,7 +1536,7 @@ ORDER;
      * @throws InvalidConfigException
      * @throws \yii\httpclient\Exception
      */
-    public function generateOrderInvoicePDF() {
+    public function actionOrderInvoiceExport() {
         $this->getParams();
         if (!$this->params) {
             throw new Exception('无法获取需要的参数');

+ 2 - 2
console/controllers/ShopController.php

@@ -119,13 +119,13 @@ class ShopController extends BaseController
         $factory = ShopExport::factory($taskId);
         $factory->listModelClass = OrderList::class;
         try {
-            if ($factory->generateOrderInvoicePDF()) {
+            if ($factory->actionOrderInvoiceExport()) {
                 Yii::$app->swooleAsyncTimer->pushAsyncResultToAdmin($factory->getUserId(), '导出成功');
             }
             unset($factory);
             return true;
         } catch (\Exception $e) {
-            echo '导出失败。详情:' . $e->getMessage();
+            echo '导出失败。详情:' . $e->getMessage() . ' ' . $e->getLine() . ' ' . $e->getFile();
             Yii::$app->swooleAsyncTimer->pushAsyncResultToAdmin($factory->getUserId(), '导出失败。详情:' . $e->getMessage() . ' ' . $e->getLine() . ' ' . $e->getFile(), false);
         }