Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
services
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
tencent
services
Commits
488fa7f0
Commit
488fa7f0
authored
Dec 26, 2019
by
王召彬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
去掉getArray方法
parent
a63e94db
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
5 deletions
+8
-5
src/Common/Config/CfgCenter.php
+8
-5
No files found.
src/Common/Config/CfgCenter.php
View file @
488fa7f0
...
@@ -23,7 +23,7 @@ class CfgCenter
...
@@ -23,7 +23,7 @@ class CfgCenter
const
SELLER_DISTRIBUTION
=
'seller_distribution'
;
//卖家分销配置
const
SELLER_DISTRIBUTION
=
'seller_distribution'
;
//卖家分销配置
/**
/**
* 读取指定的配置项 - 返回数组格式
*
根据oemId
读取指定的配置项 - 返回数组格式
* (所有配置项,需预先添加到数据库中)
* (所有配置项,需预先添加到数据库中)
* $cfgdata = CfgCenter::getArray(CfgCenter::COS);
* $cfgdata = CfgCenter::getArray(CfgCenter::COS);
* var_dump($cfgdata['Weapp']['Region']); // 输出:ap-shanghai
* var_dump($cfgdata['Weapp']['Region']); // 输出:ap-shanghai
...
@@ -32,19 +32,20 @@ class CfgCenter
...
@@ -32,19 +32,20 @@ class CfgCenter
* @param int $oemId oemId==0表示是活动啦啦
* @param int $oemId oemId==0表示是活动啦啦
* @return mixed
* @return mixed
*/
*/
public
static
function
get
Array
(
$keyName
,
$oemId
=
0
)
public
static
function
get
ByOemId
(
$keyName
,
int
$oemId
)
{
{
return
self
::
_get
(
$keyName
,
$oemId
);
return
self
::
_get
(
$keyName
,
$oemId
);
}
}
/**
/**
* 用法同上
* 根据storeId获取所属OEM平台的配置
* 根据storeId获取所属OEM平台的配置
*
*
* @param string $keyName
* @param string $keyName
* @param string $storeId
* @param string $storeId
* @return mixed
* @return mixed
*/
*/
public
static
function
getByStoreId
(
$keyName
,
$storeId
)
public
static
function
getByStoreId
(
$keyName
,
int
$storeId
)
{
{
$dbConn
=
self
::
dbConnect
(
'seller'
);
$dbConn
=
self
::
dbConnect
(
'seller'
);
$result
=
$dbConn
->
get
(
"seller"
,
[
'oemId'
],
[
'storeId'
=>
$storeId
]);
$result
=
$dbConn
->
get
(
"seller"
,
[
'oemId'
],
[
'storeId'
=>
$storeId
]);
...
@@ -52,13 +53,14 @@ class CfgCenter
...
@@ -52,13 +53,14 @@ class CfgCenter
}
}
/**
/**
* 用法同上
* 根据sellerId获取所属OEM平台的配置
* 根据sellerId获取所属OEM平台的配置
*
*
* @param string $keyName
* @param string $keyName
* @param string $sellerId
* @param string $sellerId
* @return mixed
* @return mixed
*/
*/
public
static
function
getBySellerId
(
$keyName
,
$sellerId
)
public
static
function
getBySellerId
(
$keyName
,
int
$sellerId
)
{
{
$dbConn
=
self
::
dbConnect
(
'seller'
);
$dbConn
=
self
::
dbConnect
(
'seller'
);
$result
=
$dbConn
->
get
(
"seller"
,
[
'oemId'
],
[
'sellerId'
=>
$sellerId
]);
$result
=
$dbConn
->
get
(
"seller"
,
[
'oemId'
],
[
'sellerId'
=>
$sellerId
]);
...
@@ -66,13 +68,14 @@ class CfgCenter
...
@@ -66,13 +68,14 @@ class CfgCenter
}
}
/**
/**
* 用法同上
* 根据unionId获取所属OEM平台的配置
* 根据unionId获取所属OEM平台的配置
*
*
* @param string $keyName
* @param string $keyName
* @param string $unionId
* @param string $unionId
* @return mixed
* @return mixed
*/
*/
public
static
function
getByUnionId
(
$keyName
,
$unionId
)
public
static
function
getByUnionId
(
$keyName
,
string
$unionId
)
{
{
$dbConn
=
self
::
dbConnect
(
'seller'
);
$dbConn
=
self
::
dbConnect
(
'seller'
);
$result
=
$dbConn
->
get
(
"seller"
,
[
'oemId'
],
[
'unionId'
=>
$unionId
]);
$result
=
$dbConn
->
get
(
"seller"
,
[
'oemId'
],
[
'unionId'
=>
$unionId
]);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment