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
d27d0009
Commit
d27d0009
authored
Oct 16, 2018
by
王召彬
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://139.199.22.180/tencent/services
parents
9adcabbe
0f801e29
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
6 deletions
+20
-6
src/Common/Entity/Split.php
+2
-6
src/Common/Entity/User.php
+11
-0
src/Order/Lib/OrderInterface.php
+7
-0
No files found.
src/Common/Entity/Split.php
View file @
d27d0009
...
...
@@ -45,10 +45,10 @@ class Split
}
elseif
(
isset
(
$map
[
$tableName
])
)
{
//非实体且分表
$className
=
$map
[
$tableName
];
$defaultTbleName
=
$tableName
;
$defaultT
a
bleName
=
$tableName
;
$tableName
=
$tableName
.
'_'
.
self
::
getDbNum
(
$className
);
//设置分表对应的className
EntityCollector
::
setCollector
(
$tableName
,
$defaultTbleName
);
EntityCollector
::
setCollector
(
$tableName
,
$defaultT
a
bleName
);
}
...
...
@@ -63,10 +63,6 @@ class Split
$splitCollector
=
SplitCollector
::
getCollector
();
$splitNum
=
$splitCollector
[
$className
][
'num'
];
$data
=
RequestContext
::
getContextData
();
$dbNum
=
$data
[
'dbNum'
];
if
(
!
empty
(
$dbNum
)
)
{
//若手动设置的分表信息则直接返回设置的表号
return
$dbNum
;
}
$storeId
=
$data
[
'userInfo'
][
'storeId'
];
...
...
src/Common/Entity/User.php
View file @
d27d0009
...
...
@@ -120,6 +120,17 @@ class User
$this
->
setValue
(
'token'
,
$value
);
}
public
function
setSubStoreId
(
$value
)
{
$this
->
setValue
(
'subStoreId'
,
$value
);
}
public
function
getSubStoreId
()
{
return
$this
->
getValue
(
'subStoreId'
)
??
0
;
}
public
function
fill
(
$arr
)
{
...
...
src/Order/Lib/OrderInterface.php
View file @
d27d0009
...
...
@@ -232,6 +232,13 @@ interface OrderInterface
/**
* 统计核销
*
* array(2) {
["money"]=>
string(1) "8"
["orders"]=>
string(1) "6"
}
* @param int $storeId
* @return mixed
*/
...
...
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