shish 5 éve
szülő
commit
5affd909f4

+ 1 - 1
app-hd/controllers/BaseController.php

@@ -34,7 +34,7 @@ class BaseController extends PublicController
         //token验证
         $adminId = jwt::getLoginId();
         if (getenv('YII_ENV', 'local') != 'production') {
-            //$adminId = 18;
+            //$adminId = 253;
         }
         if (empty($adminId)) {
             util::notLogin();

+ 1 - 1
biz-ghs/order/services/OrderService.php

@@ -511,7 +511,7 @@ class OrderService extends BaseService
         }
 
         if ($isPurchase) {
-            WxMessageClass::newOrderNotice($shop, $order);
+            WxMessageClass::newOrderInform($shop, $order);
         }
 
     }

+ 1 - 0
biz-hd/purchase/services/PurchaseService.php

@@ -294,6 +294,7 @@ class PurchaseService extends BaseService
         if (empty($ghs)) {
             util::fail('没有找到供货商');
         }
+        Yii::info("二个支付方式:".$payWay.' '.dict::getDict('payWay', 'debtPay'));
         if ($payWay == dict::getDict('payWay', 'debtPay')) {
             //欠款支付
             $ghs->debt = 2;

+ 4 - 8
biz/wx/classes/WxMessageClass.php

@@ -100,18 +100,14 @@ class WxMessageClass extends BaseClass
     }
 
     //新订单通知 shish 20210529
-    public static function newOrderNotice($shop, $order)
+    public static function newOrderInform($shop, $order)
     {
         $shopId = $shop->id;
         $ptStyle = $shop->ptStyle;
-        $wxBase = [
-            dict::getDict('ptStyle', 'hd') => \bizHd\wx\classes\WxOpenClass::getWxInfo(),
-            dict::getDict('ptStyle', 'ghs') => \bizHd\wx\classes\WxOpenClass::getGhsWxInfo(),
-            dict::getDict('ptStyle', 'mall') => \bizHd\wx\classes\WxOpenClass::getMallWxInfo(),
-        ];
+        $wxBase = WxOpenClass::getWxBase();
         $wx = $wxBase[$ptStyle] ?? [];
         $message = self::getAllByCondition(['ptStyle' => $ptStyle], null, '*', 'shortTemplateId');
-        $shortTempId = 'OPENTM417875155';//收入提醒
+        $shortTempId = 'OPENTM417875155';//新订单通知
         $tempId = isset($message[$shortTempId]['templateId']) ? $message[$shortTempId]['templateId'] : '';
         if (empty($tempId)) {
             return false;
@@ -128,7 +124,7 @@ class WxMessageClass extends BaseClass
                 "template_id" => $tempId,
                 "url" => Yii::$app->params['ghsDomain'],
                 "data" => [
-                    "first" => ["value" => "您有新的订单", "color" => "#173177"],
+                    "first" => ["value" => "您有新的订单,请注意查收", "color" => "#173177"],
                     "keyword1" => ["value" => $order->orderSn, "color" => "#173177"],
                     "keyword2" => ["value" => $order->actPrice, "color" => "#173177"],
                     "keyword3" => ["value" => date("Y-m-d H:i"), "color" => "#173177"],

+ 25 - 1
biz/wx/classes/WxOpenClass.php

@@ -32,7 +32,6 @@ class WxOpenClass extends BaseClass
     //取供货商平台信息 ssh 2021.2.25
     public static function getGhsOpen()
     {
-
         return self::getByCondition(['style' => dict::getDict('ptStyle', 'ghs')]);
     }
 
@@ -47,4 +46,29 @@ class WxOpenClass extends BaseClass
         return self::getByCondition(['style' => dict::getDict('ptStyle', 'mall')]);
     }
 
+    public static function getWxBase()
+    {
+        $wxBase = [
+            dict::getDict('ptStyle', 'hd') => WxOpenClass::getWxInfo(),
+            dict::getDict('ptStyle', 'ghs') => WxOpenClass::getGhsWxInfo(),
+            dict::getDict('ptStyle', 'mall') => self::getMallWxInfo(),
+        ];
+        return $wxBase;
+    }
+
+    public static function getWxInfo()
+    {
+        return \bizHd\wx\classes\WxOpenClass::getWxInfo();
+    }
+
+    public static function getGhsWxInfo()
+    {
+        return \bizHd\wx\classes\WxOpenClass::getGhsWxInfo();
+    }
+
+    public static function getMallWxInfo()
+    {
+        return \bizHd\wx\classes\WxOpenClass::getMallWxInfo();
+    }
+
 }