shish vor 4 Jahren
Ursprung
Commit
1f9013aaca
2 geänderte Dateien mit 5 neuen und 6 gelöschten Zeilen
  1. 2 3
      app-ghs/controllers/ShopExtController.php
  2. 3 3
      biz/wx/classes/WxMessageClass.php

+ 2 - 3
app-ghs/controllers/ShopExtController.php

@@ -82,9 +82,8 @@ class ShopExtController extends BaseController
     public function actionGetLb()
     {
 
-
-        $ghsShop = ShopClass::getById(36523);
-        $custom = \bizGhs\custom\classes\CustomClass::getById(537);
+        $ghsShop = ShopClass::getById(36523, true);
+        $custom = \bizGhs\custom\classes\CustomClass::getById(537, true);
         WxMessageClass::newGhsCustomInform($ghsShop, $custom);
 
         $shopId = $this->shopId;

+ 3 - 3
biz/wx/classes/WxMessageClass.php

@@ -787,7 +787,7 @@ class WxMessageClass extends BaseClass
     //供货商新客户通知 ssh 20210909
     public static function newGhsCustomInform($shop, $custom, $introduce = [])
     {
-        $ptStyle = $shop['ptStyle'] ?? 0;
+        $ptStyle = $shop->ptStyle ?? 0;
         $wxBase = WxOpenClass::getWxBase();
         $wx = $wxBase[$ptStyle] ?? [];
         $message = self::getAllByCondition(['ptStyle' => $ptStyle], null, '*', 'shortTemplateId');
@@ -796,8 +796,8 @@ class WxMessageClass extends BaseClass
         if (empty($tempId)) {
             return false;
         }
-        $customId = $custom['id'] ?? 0;
-        $customName = $custom['name'] ?? '';
+        $customId = $custom->id ?? 0;
+        $customName = $custom->name ?? '';
         $date = date("Y-m-d H:i:s");
         $adminList = ShopAdminClass::getRemainAdmin($shop);
         if (empty($adminList)) {