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
a6aa6bb0
Commit
a6aa6bb0
authored
May 08, 2021
by
徐康
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
套餐价格问题
parent
383366bf
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
19 deletions
+6
-19
shopping-cart-application-service/src/main/java/cn/freemud/adapter/ShoppingCartConvertAdapter.java
+1
-7
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/mcoffee/ShoppingCartMCoffeeServiceImpl.java
+5
-12
No files found.
shopping-cart-application-service/src/main/java/cn/freemud/adapter/ShoppingCartConvertAdapter.java
View file @
a6aa6bb0
...
...
@@ -527,13 +527,7 @@ public class ShoppingCartConvertAdapter {
||
ObjectUtils
.
equals
(
com
.
freemud
.
sdk
.
api
.
assortment
.
shoppingcart
.
constant
.
GoodsTypeEnum
.
COUPON_GOODS
.
getGoodsType
(),
cartGoods
.
getGoodsType
())
||
ObjectUtils
.
equals
(
GoodsTypeEnum
.
ALL_COUPON_GOODS
.
getGoodsType
(),
cartGoods
.
getGoodsType
()))
?
cartGoods
.
getSkuId
()
:
cartGoods
.
getSpuId
());
// 应产品要求
// 普通商品,取商品的finalePrice(普通商品售价);套餐商品,取originalPrice(套餐价格)
if
(
ObjectUtils
.
equals
(
com
.
freemud
.
sdk
.
api
.
assortment
.
shoppingcart
.
constant
.
GoodsTypeEnum
.
SET_MEAL_GOODS
.
getGoodsType
(),
cartGoods
.
getGoodsType
())){
productType
.
setPrice
(
null
==
cartGoods
.
getOriginalPrice
()
?
0
:
cartGoods
.
getOriginalPrice
().
intValue
());
}
else
{
productType
.
setPrice
(
cartGoods
.
getFinalPrice
()
==
null
?
0
:
cartGoods
.
getFinalPrice
().
intValue
());
}
productType
.
setPrice
(
cartGoods
.
getFinalPrice
()
==
null
?
0
:
cartGoods
.
getFinalPrice
().
intValue
());
productType
.
setValidatePrice
(
productType
.
getPrice
()
==
0
?
0
:
1
);
productType
.
setValidateAttribute
(
1
);
productType
.
setValidateStatuses
(
Arrays
.
asList
(
2
));
...
...
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/mcoffee/ShoppingCartMCoffeeServiceImpl.java
View file @
a6aa6bb0
...
...
@@ -201,8 +201,7 @@ public class ShoppingCartMCoffeeServiceImpl {
//根据券号获取券名称
String
couponName
=
""
;
if
(
StringUtils
.
isNotEmpty
(
couponCode
))
{
CustomerInfoVo
userLoginInfoDto
=
getCustomerInfoVo
(
sessionId
);
couponName
=
getCouponNameByCode
(
couponCode
,
userLoginInfoDto
,
couponName
=
getCouponNameByCode
(
couponCode
,
assortmentCustomerInfoVo
,
BusinessTypeEnum
.
getByType
(
addShoppingCartGoodsRequestVo
.
getMenuType
()).
getCode
(),
storeId
);
addCartGoods
.
setCouponName
(
couponName
);
}
...
...
@@ -1542,9 +1541,9 @@ public class ShoppingCartMCoffeeServiceImpl {
//超值加购商品赋值
if
(
ObjectUtils
.
equals
(
GoodsTypeEnum
.
REDUCE_PRICE_GOODS
.
getGoodsType
(),
cartGoods
.
getGoodsType
())
||
ObjectUtils
.
equals
(
GoodsTypeEnum
.
COUPON_GOODS
.
getGoodsType
(),
cartGoods
.
getGoodsType
()))
{
//
cartGoods.setOriginalPrice(productBeanListSpuClass.get(0).getOriginalPrice());
//
cartGoods.setFinalPrice(productBeanListSpuClass.get(0).getFinalPrice());
//
cartGoods.setPackPrice(productBeanListSpuClass.get(0).getPackPrice());
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
());
...
...
@@ -1618,13 +1617,7 @@ public class ShoppingCartMCoffeeServiceImpl {
cartGoods
.
setIsSeedCouponGoods
(
addShoppingCartGoodsRequestVo
.
getIsSeedCouponGoods
());
cartGoods
.
setCouponCode
(
addShoppingCartGoodsRequestVo
.
getCouponCode
());
Integer
goodsType
=
StringUtils
.
isEmpty
(
skuId
)
||
ObjectUtils
.
equals
(
spuId
,
skuId
)
?
GoodsTypeEnum
.
SPU_GOODS
.
getGoodsType
()
:
GoodsTypeEnum
.
SKU_GOODS
.
getGoodsType
();
if
(
spuId
.
startsWith
(
CommonsConstant
.
COUPON_PREFIX
))
{
goodsType
=
GoodsTypeEnum
.
COUPON_GOODS
.
getGoodsType
();
cartGoods
.
setSpuId
(
mCoffeeProductIdsVo
.
getSpuId
());
cartGoods
.
setSkuId
(
goodsId
);
cartGoods
.
setCouponCode
(
spuId
.
substring
(
CommonsConstant
.
COUPON_PREFIX
.
length
()));
// cartGoods.setCartGoodsUid(spuId);
}
else
if
(
CollectionUtils
.
isNotEmpty
(
addShoppingCartGoodsRequestVo
.
getProductComboList
())
||
CollectionUtils
.
isNotEmpty
(
addShoppingCartGoodsRequestVo
.
getProductGroupList
()))
{
if
(
CollectionUtils
.
isNotEmpty
(
addShoppingCartGoodsRequestVo
.
getProductComboList
())
||
CollectionUtils
.
isNotEmpty
(
addShoppingCartGoodsRequestVo
.
getProductGroupList
()))
{
goodsType
=
GoodsTypeEnum
.
SET_MEAL_GOODS
.
getGoodsType
();
}
else
if
(
CommonsConstant
.
COUPON_TYPE
.
equals
(
addShoppingCartGoodsRequestVo
.
getCouponType
())){
goodsType
=
GoodsTypeEnum
.
ALL_COUPON_GOODS
.
getGoodsType
();
...
...
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