소스 검색

订单通知

shish 2 년 전
부모
커밋
990f4147ba
1개의 변경된 파일7개의 추가작업 그리고 5개의 파일을 삭제
  1. 7 5
      biz/wx/classes/WxMessageClass.php

+ 7 - 5
biz/wx/classes/WxMessageClass.php

@@ -184,7 +184,13 @@ class WxMessageClass extends BaseClass
         if (empty($tempId)) {
             return false;
         }
-        $title = $order->book == 1 ? '【预订】' : '';
+        $title = '';
+        if (isset($order->book) && $order->book == 1) {
+            $title = '【预订】';
+        }
+        if (isset($order->presell) && $order->presell == 1) {
+            $title = '【预售】';
+        }
         $orderId = $order->id;
         $actPrice = $order->actPrice;
         $actPrice = floatval($actPrice);
@@ -202,11 +208,7 @@ class WxMessageClass extends BaseClass
             if ($ptStyle == dict::getDict('ptStyle', 'ghs')) {
                 $openId = isset($admin['ghsOpenId']) ? $admin['ghsOpenId'] : '';
             }
-
             $orderSn = $shopName == '首店' ? $order->orderSn : $shopName;
-            if (isset($order->presell) && $order->presell == 1) {
-                $title = '【预售】';
-            }
             $data = [
                 "touser" => $openId,
                 "template_id" => $tempId,