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
a6c9882f
Commit
a6c9882f
authored
Nov 28, 2018
by
feixiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
分表对照组编写
parent
a15bfbfa
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
1 deletions
+18
-1
src/Common/Entity/Split.php
+14
-1
src/Order/Lib/OrderInterface.php
+4
-0
No files found.
src/Common/Entity/Split.php
View file @
a6c9882f
...
...
@@ -64,12 +64,25 @@ class Split
$splitNum
=
$splitCollector
[
$className
][
'num'
];
$data
=
RequestContext
::
getContextData
();
$dbId
=
$data
[
'userInfo'
][
'dbId'
]
??
0
;
$storeId
=
$data
[
'userInfo'
][
'storeId'
];
if
(
empty
(
$storeId
)
)
{
throw
new
CommonException
([
"msg"
=>
"参数异常,获取店铺信息失败。"
]);
}
return
$storeId
%
$splitNum
;
//原始数据
$num
=
$storeId
%
$splitNum
;
//对照数据
$dbNum
=
$dbId
%
$splitNum
;
if
(
$dbId
>
0
&&
$num
!==
$dbNum
)
{
App
::
debug
(
'[分表异常][dbId与storeId分表不一致]'
.
json_encode
(
$data
[
'userInfo'
]));
}
return
$num
;
}
private
function
isTesting
()
...
...
src/Order/Lib/OrderInterface.php
View file @
a6c9882f
...
...
@@ -24,6 +24,7 @@ use Swoft\Core\ResultInterface;
* @method ResultInterface deferGetOtherInfo(int $storeId, string $orderSn, array $consigneeFields = [], array $itemFields = [])
* @method ResultInterface deferGetList(int $storeId,array $ids)
* @method ResultInterface deferUnconfirmedCount(int $storeId)
* @method ResultInterface deferGetOrder(int $dbId, $orderSn)
*/
interface
OrderInterface
{
...
...
@@ -241,4 +242,6 @@ interface OrderInterface
*/
public
function
unconfirmedCount
(
int
$storeId
);
public
function
getOrder
(
int
$dbId
,
$orderSn
);
}
\ 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