|
|
@@ -46,13 +46,18 @@ class ShopController extends BaseController
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- $addShopList = [];
|
|
|
if (!empty($mainIdList)) {
|
|
|
$addShopList = ShopClass::getAllByCondition(['mainId' => ['in', $mainIdList]], null, 'id,shopName,merchantName,sjId,mainId', 'id');
|
|
|
+ if (!empty($addShopList)) {
|
|
|
+ foreach ($addShopList as $addShop) {
|
|
|
+ $addShopId = $addShop['id'] ?? 0;
|
|
|
+ if (isset($shopList[$addShopId]) == false) {
|
|
|
+ $shopList[$addShopId] = $addShop;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
- $all = array_merge($shopList, $addShopList);
|
|
|
- $all = array_unique($all);
|
|
|
- $list = array_values($all);
|
|
|
+ $list = array_values($shopList);
|
|
|
util::success(['list' => $list]);
|
|
|
}
|
|
|
|