Toggle navigation
Toggle navigation
This project
Loading...
Sign in
jiujian
/
client-customer-order-api
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
zhuyifan
2025-03-20 11:19:15 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
b67a73a918371f195225121826cbc090cea485ad
b67a73a9
1 parent
552f7d9f
fix(order): 返还取消订单占用的 SKU 销售数量
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
1 deletions
src/main/java/com/infoloop/tianting/service/client/OrderServiceRpcClient.java
src/main/java/com/infoloop/tianting/service/client/OrderServiceRpcClient.java
View file @
b67a73a
...
...
@@ -187,7 +187,19 @@ public class OrderServiceRpcClient {
.
setUpdateSource
(
updateOrderDto
.
getUpdatedSource
())
.
setModification
(
modification
)
.
build
();
return
orderServiceRpcBlockingStub
.
updateClientCustomerOrder
(
request
);
final
UpdateClientCustomerOrderRpcResponse
updateClientCustomerOrderRpcResponse
=
orderServiceRpcBlockingStub
.
updateClientCustomerOrder
(
request
);
if
(
updateClientCustomerOrderRpcResponse
.
getIsUpdated
()
&&
updateOrderDto
.
getStatus
()
==
OrderStatusEnum
.
ORDER_CANCELED
)
{
final
var
orderById
=
getOrderById
(
updateOrderDto
.
getId
());
if
(
orderById
!=
null
&&
orderById
.
getCloseTimeType
()
==
CloseTimeType
.
IMMEDIATELY
)
{
final
var
orderDetails
=
getOrderDetailsByOrderId
(
orderById
.
getId
());
final
var
isSuccess
=
addSkusSellQuantities
(
orderById
.
getEnterpriseId
(),
orderById
.
getStallId
(),
orderDetails
.
stream
().
map
(
e
->
AddSkusSellQuantityBO
.
builder
()
.
skuId
(
e
.
getSkuId
())
.
quantity
(-
e
.
getCount
())
.
build
()).
collect
(
Collectors
.
toList
()));
log
.
info
(
"Order {} returnSkusSellQuantities result: {}"
,
orderById
.
getId
(),
isSuccess
);
}
}
return
updateClientCustomerOrderRpcResponse
;
}
public
boolean
updateClientCustomerOrderCancel
(
int
enterpriseId
,
int
id
)
{
...
...
Please
register
or
login
to post a comment