Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
O
order-group
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
order-group-application
order-group
Commits
effccad2
Commit
effccad2
authored
Nov 04, 2021
by
周晓航
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
解决前人 留下的坑: 校验套餐商品的时候 会导致校验失败
Signed-off-by: 周晓航 <xiaohang.zhou@freemud.com>
parent
4568d9fa
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
+4
-0
shopping-cart-application-service/src/main/java/cn/freemud/adapter/ShoppingCartConvertAdapter.java
+4
-0
No files found.
shopping-cart-application-service/src/main/java/cn/freemud/adapter/ShoppingCartConvertAdapter.java
View file @
effccad2
...
...
@@ -582,6 +582,10 @@ public class ShoppingCartConvertAdapter {
?
cartGoods
.
getSkuId
()
:
cartGoods
.
getSpuId
());
//fisherman 这里 商品服务校验需要商品原价, 不是购物车的 finalPrice
productType
.
setPrice
(
cartGoods
.
getOriginalPrice
()
==
null
?
0
:
cartGoods
.
getOriginalPrice
().
intValue
());
if
(
Objects
.
equals
(
cartGoods
.
getGoodsType
(),
GoodsTypeEnum
.
SET_MEAL_GOODS
.
getGoodsType
()))
{
// 套餐会出现商品组的情况,会导致 商品服务校验失败,商品服务不需要商品组的价格 坑B 所以只能取 套餐商品原价格
productType
.
setPrice
(
cartGoods
.
getFinalPrice
()
==
null
?
0
:
cartGoods
.
getFinalPrice
().
intValue
());
}
productType
.
setValidatePrice
(
productType
.
getPrice
()
==
0
?
0
:
1
);
productType
.
setValidateAttribute
(
1
);
productType
.
setValidateStatuses
(
Arrays
.
asList
(
2
));
...
...
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