shish 2 месяцев назад
Родитель
Сommit
be62ea15cf

+ 1 - 0
biz-hd/merchant/services/SjService.php

@@ -140,6 +140,7 @@ class SjService extends BaseService
             'long' => $applyData['long'] ?? '',
             'img' => ['/example/shop/1.jpg'],
             'ptStyle' => $ptStyle,
+            'pt' => empty($applyData['introShopId'] ?? 0) ? 1 : 0,
             'live' => $live,
             'onlyCg' => $onlyCg,
             'deadline'=> date("Y-m-d H:i:s", $deadTime),

+ 2 - 0
biz-hd/saas/services/ApplyService.php

@@ -130,6 +130,8 @@ class ApplyService extends BaseService
                 }
             }
         }
+        // 非批发店邀请注册,视为平台直客
+        $data['pt'] = empty($data['introShopId']) ? 1 : 0;
         $mobile = $data['mobile'] ?? '';
         $data['licenseNo'] = $mobile;
         $adminId = $data['adminId'] ?? 0;

+ 2 - 0
biz/ghs/classes/GhsClass.php

@@ -124,6 +124,7 @@ class GhsClass extends BaseClass
         $mobile = $shop['mobile'] ?? '';
         $uniGhsId = $shop['uniGhsId'] ?? 0;
         $hasManyGhs = $shop['hasManyGhs'] ?? 0;
+        $hdShopPt = intval($shop['pt'] ?? 0);
         if ($uniGhsId == 0 && $hasManyGhs == 0) {
             ShopClass::updateById($hdShopId, ['uniGhsId' => $ghsId]);
         } else {
@@ -165,6 +166,7 @@ class GhsClass extends BaseClass
                 'home' => $home,
                 'homeAmount' => $homeAmount,
                 'homeNum' => $homeNum,
+                'pt' => $hdShopPt === 1 ? 1 : 0,
             ];
             $custom = CustomClass::addCustom($customData);
         }