Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
goods
Project
Project
Details
Activity
Releases
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
bp
goods
Commits
272c667e
Commit
272c667e
authored
Aug 13, 2021
by
luhongguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update: tcc 同一条数据取消时候问题
parent
1f5ca56c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
10 deletions
+11
-10
Tcc2Service.php
application/services/tcc/Tcc2Service.php
+11
-10
No files found.
application/services/tcc/Tcc2Service.php
View file @
272c667e
...
@@ -548,12 +548,12 @@ class Tcc2Service
...
@@ -548,12 +548,12 @@ class Tcc2Service
$goodsSkuId
=
$item
[
"goods_sku_id"
];
$goodsSkuId
=
$item
[
"goods_sku_id"
];
$num
=
$item
[
"num"
];
$num
=
$item
[
"num"
];
$sku
=
PindanGoodsSku
::
getRecord
([
"goods_sku_id"
=>
$goodsSkuId
]
$sku
=
PindanGoodsSku
::
getRecord
Master
([
"goods_sku_id"
=>
$goodsSkuId
]
,
[
"goods_sku_id"
,
"total_amount_order"
,
"inventory_rest"
,
"inventory_lock"
,
"online_status"
]);
,
[
"goods_sku_id"
,
"total_amount_order"
,
"inventory_rest"
,
"inventory_lock"
,
"online_status"
]);
if
(
!
empty
(
$sku
[
0
]))
{
$params
=
[
$params
=
[
"inventory_rest"
=>
$sku
[
"inventory_rest"
]
+
$num
,
"inventory_rest"
=>
$sku
[
0
]
[
"inventory_rest"
]
+
$num
,
"total_amount_order"
=>
$sku
[
"total_amount_order"
]
-
$num
,
"total_amount_order"
=>
$sku
[
0
]
[
"total_amount_order"
]
-
$num
,
];
];
$rowCount
=
PindanGoodsSku
::
save
(
$params
,
[
"goods_sku_id"
=>
$goodsSkuId
,
"total_amount_order[>=]"
=>
$num
]);
$rowCount
=
PindanGoodsSku
::
save
(
$params
,
[
"goods_sku_id"
=>
$goodsSkuId
,
"total_amount_order[>=]"
=>
$num
]);
if
(
$rowCount
<=
0
)
{
if
(
$rowCount
<=
0
)
{
...
@@ -561,6 +561,7 @@ class Tcc2Service
...
@@ -561,6 +561,7 @@ class Tcc2Service
throw
new
GoodsException
([
"cus"
=>
32
]);
throw
new
GoodsException
([
"cus"
=>
32
]);
}
}
}
}
}
if
(
!
PindanGoodsSku
::
commit
())
{
if
(
!
PindanGoodsSku
::
commit
())
{
PindanGoodsSku
::
rollback
();
PindanGoodsSku
::
rollback
();
...
...
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