Commit 488fa7f0 by 王召彬

去掉getArray方法

parent a63e94db
......@@ -23,7 +23,7 @@ class CfgCenter
const SELLER_DISTRIBUTION = 'seller_distribution'; //卖家分销配置
/**
* 读取指定的配置项 - 返回数组格式
* 根据oemId读取指定的配置项 - 返回数组格式
* (所有配置项,需预先添加到数据库中)
* $cfgdata = CfgCenter::getArray(CfgCenter::COS);
* var_dump($cfgdata['Weapp']['Region']); // 输出:ap-shanghai
......@@ -32,19 +32,20 @@ class CfgCenter
* @param int $oemId oemId==0表示是活动啦啦
* @return mixed
*/
public static function getArray($keyName, $oemId = 0)
public static function getByOemId($keyName, int $oemId)
{
return self::_get($keyName, $oemId);
}
/**
* 用法同上
* 根据storeId获取所属OEM平台的配置
*
* @param string $keyName
* @param string $storeId
* @return mixed
*/
public static function getByStoreId($keyName, $storeId)
public static function getByStoreId($keyName, int $storeId)
{
$dbConn = self::dbConnect('seller');
$result = $dbConn->get("seller", ['oemId'], ['storeId' => $storeId]);
......@@ -52,13 +53,14 @@ class CfgCenter
}
/**
* 用法同上
* 根据sellerId获取所属OEM平台的配置
*
* @param string $keyName
* @param string $sellerId
* @return mixed
*/
public static function getBySellerId($keyName, $sellerId)
public static function getBySellerId($keyName, int $sellerId)
{
$dbConn = self::dbConnect('seller');
$result = $dbConn->get("seller", ['oemId'], ['sellerId' => $sellerId]);
......@@ -66,13 +68,14 @@ class CfgCenter
}
/**
* 用法同上
* 根据unionId获取所属OEM平台的配置
*
* @param string $keyName
* @param string $unionId
* @return mixed
*/
public static function getByUnionId($keyName, $unionId)
public static function getByUnionId($keyName, string $unionId)
{
$dbConn = self::dbConnect('seller');
$result = $dbConn->get("seller", ['oemId'], ['unionId' => $unionId]);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment