shish пре 2 година
родитељ
комит
6801259154
1 измењених фајлова са 14 додато и 1 уклоњено
  1. 14 1
      app-hd/controllers/NoticeController.php

+ 14 - 1
app-hd/controllers/NoticeController.php

@@ -25,7 +25,7 @@ class NoticeController extends PublicController
 
     public $categoryList;
 
-    //拉卡拉回通知 ssh 20231009
+    //拉卡拉回通知 ssh 20231009
     public function actionPayCallback()
     {
         $postStr = file_get_contents('php://input');//接收微信服务器返回的xml消息体
@@ -141,6 +141,19 @@ class NoticeController extends PublicController
                                 OrderClass::onlinePrint($order);
                                 $order->printNum += 1;
                                 $order->save();
+
+                                if (getenv('YII_ENV') == 'production') {
+                                    //福州我要花要打二次小票
+                                    $needTwoPrint = [7538];
+                                } else {
+                                    $needTwoPrint = [644];
+                                }
+                                if (in_array($order->mainId, $needTwoPrint)) {
+                                    OrderClass::onlinePrint($order);
+                                    $order->printNum += 1;
+                                    $order->save();
+                                }
+
                             }
                         }
                         $cgShopId = $cg->shopId ?? 0;