' => 0], null, '*', null, true); if (!empty($customList)) { foreach ($customList as $custom) { $hdId = $custom->hdId ?? 0; if (!empty($hdId)) { continue; } $shopId = $custom->shopId ?? 0; $shop = ShopClass::getById($shopId, true); if (empty($shop)) { echo "没有门店 \n"; continue; } $userId = $custom->userId ?? 0; $shopName = $shop->shopName ?? ''; $hdMobile = $shop->mobile ?? ''; $sjId = $shop->sjId ?? 0; $sjName = $shop->merchantName ?? ''; $hdName = $shop->default == 1 ? $sjName : $sjName . ' ' . $shopName; $hdPy = stringUtil::py($hdName); $customId = $custom->id ?? 0; $hdAvatar = $shop->avatar ?? ''; $hdData = [ 'shopId' => $shopId, 'userId' => $userId, 'name' => $hdName, 'sjId' => $sjId, 'customId' => $customId, 'avatar' => $hdAvatar, 'py' => $hdPy, 'mobile' => $hdMobile, 'province' => $shop->province ?? '', 'city' => $shop->city ?? '', 'dist' => $shop->dist ?? '', 'address' => $shop->address ?? '', 'floor' => $shop->floor ?? '', 'fullAddress' => $shop->fullAddress ?? '', 'showAddress' => $shop->showAddress ?? '', 'lat' => $shop->lat ?? '', 'long' => $shop->long ?? '', ]; HdClass::addData($hdData); echo "OK\n"; } } } }