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
94022ca0
Commit
94022ca0
authored
Feb 12, 2020
by
王召彬
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'ft-oem'
parents
1691554f
3455aa05
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
26 additions
and
2 deletions
+26
-2
src/Auth/Enum/AuthEnum.php
+2
-0
src/Common/Config/CfgCenter.php
+21
-0
src/Store/Lib/StoreInterface.php
+3
-2
No files found.
src/Auth/Enum/AuthEnum.php
View file @
94022ca0
...
...
@@ -15,6 +15,7 @@ class AuthEnum
const
SCOPE_AGENT
=
2
;
// 店铺分销代理者
const
SCOPE_SELLER
=
3
;
//卖家
const
SCOPE_OEMADM
=
3.1
;
//oem管理员
const
SCOPE_ADMIN
=
4
;
//管理员
const
SCOPE_SUPER_ADMIN
=
5
;
//超级管理员
...
...
@@ -30,6 +31,7 @@ class AuthEnum
const
AUTH_TYPE_E_AND_S
=
203
;
//选择授权(用户自己选择进行员工授权还是卖家授权)
const
AUTH_TYPE_BUYER
=
204
;
//买家授权
const
AUTH_TYPE_OEMADM
=
205
;
//oem管理员授权
...
...
src/Common/Config/CfgCenter.php
View file @
94022ca0
...
...
@@ -24,6 +24,7 @@ class CfgCenter
const
PAY_ZHIMEI
=
'pay_zhimei'
;
//致美的支付配置
const
SELLER_DISTRIBUTION
=
'seller_distribution'
;
//卖家分销配置
const
MP_ZHIMEI
=
'mp_zhimei'
;
//致美的公众号配置
const
MP_OEMADM
=
'mp_oemadm'
;
// OEM机构管理员公众号后台,使用云脉科技公众号
/**
* 根据用户token获取配置, 优先使用此方法读取配置
...
...
@@ -145,6 +146,26 @@ class CfgCenter
return
is_array
(
$resArr
)
?
$resArr
:
$result
[
'value'
];
}
/**
* 根据配置名称查询所有匹配项。包含所有oem机构的配置
*
* @param string $keyName
* @return array
*/
public
static
function
getByKey
(
string
$keyName
)
{
$result
=
[];
$dbConn
=
self
::
dbConnect
();
//连接配置库
$rows
=
$dbConn
->
select
(
"config"
,
[
'oemId'
,
'value'
],
[
'name'
=>
$keyName
]);
foreach
(
$rows
as
$row
)
{
$result
[
$row
[
'oemId'
]]
=
[
'oemId'
=>
$row
[
'oemId'
],
'value'
=>
json_decode
(
$row
[
'value'
],
true
),
];
}
return
$result
;
}
public
static
function
dbConnect
(
$database
=
''
)
{
if
(
$database
==
''
)
{
...
...
src/Store/Lib/StoreInterface.php
View file @
94022ca0
...
...
@@ -27,7 +27,7 @@ use Swoft\Core\ResultInterface;
* @method ResultInterface deferUpdateStore(int $storeId, array $data)
* @method ResultInterface deferAddVipTime(int $storeId, int $days)
* @method ResultInterface deferDeleteStore(int $storeId)
* @method ResultInterface deferGetStoreCount(int $startTime, int $endTime, $edition=null)
* @method ResultInterface deferGetStoreCount(int $startTime, int $endTime, $edition=null
, $oemId=0
)
* @method ResultInterface deferGetWxacodeUrl(int $storeId, int $type, string $page, string $scene)
*/
interface
StoreInterface
...
...
@@ -179,6 +179,6 @@ interface StoreInterface
* @param integer $edition
* @return integer
*/
public
function
getStoreCount
(
int
$startTime
,
int
$endTime
,
$edition
=
null
);
public
function
getStoreCount
(
int
$startTime
,
int
$endTime
,
$edition
=
null
,
$oemId
=
0
);
}
\ No newline at end of file
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