20240120-ljl-routeConfig
ljl 10 months ago
parent 0bf7e358b6
commit f7b80af372

@ -64,8 +64,8 @@ class MallSDao extends AbstractDao {
if (empty($mallIds)) {
return [];
}
$mallNameList = $this->query("SELECT mall_id, mall_name FROM %b WHERE mall_id IN %li", $this->getTable(), array_unique($mallIds));
return ZcArrayHelper::changeKeyRow($mallNameList, 'mallId');
$rows = $this->query("SELECT mall_id, mall_name FROM %b WHERE mall_id IN %li", $this->getTable(), array_unique($mallIds));
return array_column($rows, 'mallName', 'mallId');
}
public function updateMallRole($mallId, $mallRole){

@ -48,4 +48,8 @@ class OpPageSettingDao extends AbstractDao {
$affRow = $this->insertUpdate($data);
return $affRow > 0 ? true : false;
}
public function getByMallIdAndSubAccountId($mallId, $subAccountId) {
return $this->queryFirstRow('select * from %b where mall_id = %s and mall_sub_account_id = %s', $mallId, $subAccountId);
}
}

@ -1224,4 +1224,29 @@ class MallAuthService extends AbstractService {
$row = $this->mallAuthDao->getListByMallId($mallId);
return $row ? true : false;
}
/* public function getAuthMallMap($venderId, $shopName, $preVenderIdList) {
list($multiShopOptions, $groupIdAndGroupNameMap) = $this->getVenderAuthGroupMultiShopOptions($venderId, $shopName, $preVenderIdList);
$venderIds = array_keys($multiShopOptions);
$selectedAuthVenderIds = ((count($multiShopOptions) > 1) && $venderAuthConfig['selectedAuthVenderIds']) ? explode(',', $venderAuthConfig['selectedAuthVenderIds']) : array_keys($multiShopOptions);
$selectedAuthVenderIds = array_map(function ($selectedAuthVenderId) {
return (string)$selectedAuthVenderId;
}, $selectedAuthVenderIds);
$selectedAuthGroupIds = ((count($groupIdAndGroupNameMap) > 1) && $venderAuthConfig['selectedAuthGroupIds']) ? explode(',', $venderAuthConfig['selectedAuthGroupIds']) : array_keys($groupIdAndGroupNameMap);
$selectedAuthGroupIds = array_map(function ($selectedAuthGroupId) {
return (string)$selectedAuthGroupId;
}, $selectedAuthGroupIds);
$authVenderInfoList = $this->getVenderAppByVenderIds($venderIds, Zc::C('appName'));
$venderIdAndShopNameMap = [];
$expiredVenderIdAndShopNameMap = [];
foreach ($multiShopOptions as $venderId => $shopName) {
if ($authVenderInfoList[$venderId]['accessTokenIsInvalid'] || strtotime($authVenderInfoList[$venderId]['gmtExpire']) < time()) {
$expiredVenderIdAndShopNameMap[$venderId] = $shopName;
} else {
$venderIdAndShopNameMap[$venderId] = $shopName;
}
}
return compact('venderIdAndShopNameMap', 'expiredVenderIdAndShopNameMap', 'selectedAuthVenderIds', 'selectedAuthGroupIds', 'groupIdAndGroupNameMap', 'selectedAuthType');
} */
}
Loading…
Cancel
Save