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
228dbb6a
Commit
228dbb6a
authored
Dec 05, 2020
by
孙昱
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature/20201112_套餐价格计算_yu.sun' into qa
parents
0a3ad6fa
25581b00
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
4 deletions
+31
-4
shopping-cart-application-service/src/main/java/cn/freemud/adapter/ShoppingCartConvertAdapter.java
+0
-2
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/mcoffee/ShoppingCartMCoffeeServiceImpl.java
+31
-2
No files found.
shopping-cart-application-service/src/main/java/cn/freemud/adapter/ShoppingCartConvertAdapter.java
View file @
228dbb6a
...
@@ -510,8 +510,6 @@ public class ShoppingCartConvertAdapter {
...
@@ -510,8 +510,6 @@ public class ShoppingCartConvertAdapter {
// 应产品要求
// 应产品要求
// 普通商品,取商品的finalePrice(普通商品售价);套餐商品,取originalPrice(套餐价格)
// 普通商品,取商品的finalePrice(普通商品售价);套餐商品,取originalPrice(套餐价格)
if
(
ObjectUtils
.
equals
(
com
.
freemud
.
sdk
.
api
.
assortment
.
shoppingcart
.
constant
.
GoodsTypeEnum
.
SET_MEAL_GOODS
.
getGoodsType
(),
cartGoods
.
getGoodsType
())){
if
(
ObjectUtils
.
equals
(
com
.
freemud
.
sdk
.
api
.
assortment
.
shoppingcart
.
constant
.
GoodsTypeEnum
.
SET_MEAL_GOODS
.
getGoodsType
(),
cartGoods
.
getGoodsType
())){
int
price
=
(
null
==
cartGoods
.
getProductGroupList
()
?
0
:
cartGoods
.
getProductGroupList
().
stream
().
mapToInt
(
t
->(
null
==
t
.
getOriginalPrice
()
?
0
:
t
.
getOriginalPrice
().
intValue
())
*
t
.
getQty
()).
sum
())
+
cartGoods
.
getOriginalPrice
().
intValue
();
productType
.
setPrice
(
null
==
cartGoods
.
getOriginalPrice
()
?
0
:
cartGoods
.
getOriginalPrice
().
intValue
());
productType
.
setPrice
(
null
==
cartGoods
.
getOriginalPrice
()
?
0
:
cartGoods
.
getOriginalPrice
().
intValue
());
}
else
{
}
else
{
productType
.
setPrice
(
cartGoods
.
getFinalPrice
()
==
null
?
0
:
cartGoods
.
getFinalPrice
().
intValue
());
productType
.
setPrice
(
cartGoods
.
getFinalPrice
()
==
null
?
0
:
cartGoods
.
getFinalPrice
().
intValue
());
...
...
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/mcoffee/ShoppingCartMCoffeeServiceImpl.java
View file @
228dbb6a
...
@@ -1370,8 +1370,7 @@ public class ShoppingCartMCoffeeServiceImpl {
...
@@ -1370,8 +1370,7 @@ public class ShoppingCartMCoffeeServiceImpl {
//超值加购商品赋值
//超值加购商品赋值
if
(
ObjectUtils
.
equals
(
GoodsTypeEnum
.
REDUCE_PRICE_GOODS
.
getGoodsType
(),
cartGoods
.
getGoodsType
())
if
(
ObjectUtils
.
equals
(
GoodsTypeEnum
.
REDUCE_PRICE_GOODS
.
getGoodsType
(),
cartGoods
.
getGoodsType
())
||
ObjectUtils
.
equals
(
GoodsTypeEnum
.
COUPON_GOODS
.
getGoodsType
(),
cartGoods
.
getGoodsType
())
||
ObjectUtils
.
equals
(
GoodsTypeEnum
.
COUPON_GOODS
.
getGoodsType
(),
cartGoods
.
getGoodsType
()))
{
||
ObjectUtils
.
equals
(
GoodsTypeEnum
.
SET_MEAL_GOODS
.
getGoodsType
(),
cartGoods
.
getGoodsType
()))
{
cartGoods
.
setOriginalPrice
(
productBeanListSpuClass
.
get
(
0
).
getOriginalPrice
());
cartGoods
.
setOriginalPrice
(
productBeanListSpuClass
.
get
(
0
).
getOriginalPrice
());
cartGoods
.
setFinalPrice
(
productBeanListSpuClass
.
get
(
0
).
getFinalPrice
());
cartGoods
.
setFinalPrice
(
productBeanListSpuClass
.
get
(
0
).
getFinalPrice
());
cartGoods
.
setPackPrice
(
productBeanListSpuClass
.
get
(
0
).
getPackPrice
());
cartGoods
.
setPackPrice
(
productBeanListSpuClass
.
get
(
0
).
getPackPrice
());
...
@@ -1385,6 +1384,36 @@ public class ShoppingCartMCoffeeServiceImpl {
...
@@ -1385,6 +1384,36 @@ public class ShoppingCartMCoffeeServiceImpl {
cartGoods
.
setTaxId
(
productBeanListSpuClass
.
get
(
0
).
getTaxId
());
cartGoods
.
setTaxId
(
productBeanListSpuClass
.
get
(
0
).
getTaxId
());
}
}
//套餐商品赋值
if
(
ObjectUtils
.
equals
(
GoodsTypeEnum
.
SET_MEAL_GOODS
.
getGoodsType
(),
cartGoods
.
getGoodsType
())){
cartGoods
.
setOriginalPrice
(
productBeanListSpuClass
.
get
(
0
).
getOriginalPrice
());
cartGoods
.
setFinalPrice
(
productBeanListSpuClass
.
get
(
0
).
getFinalPrice
());
cartGoods
.
setPackPrice
(
productBeanListSpuClass
.
get
(
0
).
getPackPrice
());
cartGoods
.
setCustomerCode
(
productBeanListSpuClass
.
get
(
0
).
getCustomerCode
());
cartGoods
.
setName
(
productBeanListSpuClass
.
get
(
0
).
getName
());
cartGoods
.
setSpuName
(
productBeanListSpuClass
.
get
(
0
).
getName
());
cartGoods
.
setSkuName
(
productBeanListSpuClass
.
get
(
0
).
getName
());
cartGoods
.
setPic
(
productBeanListSpuClass
.
get
(
0
).
getPicture
());
cartGoods
.
setStockLimit
(
productBeanListSpuClass
.
get
(
0
).
getStockLimit
()
==
1
);
cartGoods
.
setTax
(
productBeanListSpuClass
.
get
(
0
).
getTax
());
cartGoods
.
setTaxId
(
productBeanListSpuClass
.
get
(
0
).
getTaxId
());
//套餐可选商品赋值
if
(
CollectionUtils
.
isNotEmpty
(
productBeanListSpuClass
.
get
(
0
).
getProductGroupList
())){
for
(
ProductBeanDTO
.
ProductGroupType
groupType
:
productBeanListSpuClass
.
get
(
0
).
getProductGroupList
())
{
if
(
CollectionUtils
.
isNotEmpty
(
groupType
.
getGroupDetail
())){
for
(
ProductBeanDTO
.
ProductGroupType
.
GroupDetailType
detailType
:
groupType
.
getGroupDetail
())
{
for
(
CartGoods
.
ComboxGoods
groupGoods
:
cartGoods
.
getProductGroupList
())
{
if
(
detailType
.
getProductId
().
equals
(
groupGoods
.
getGoodsId
()))
{
groupGoods
.
setFinalPrice
(
detailType
.
getMarkUpPrice
().
longValue
());
groupGoods
.
setOriginalPrice
(
detailType
.
getProductPrice
().
longValue
());
}
}
}
}
}
}
}
}
}
...
...
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