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
01287fbb
Commit
01287fbb
authored
Dec 10, 2020
by
yu.sun
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature/20201112_套餐价格计算_yu.sun'
parents
a69c395e
50068762
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
319 additions
and
18 deletions
+319
-18
.gitignore
+1
-0
assortment-shoppingcart-sdk/src/main/java/com/freemud/sdk/api/assortment/shoppingcart/constant/ShoppingCartConstant.java
+4
-0
shopping-cart-application-service/src/main/java/cn/freemud/adapter/ShoppingCartConvertAdapter.java
+0
-0
shopping-cart-application-service/src/main/java/cn/freemud/adapter/ShoppingCartMccafeAdapter.java
+0
-0
shopping-cart-application-service/src/main/java/cn/freemud/entities/dto/product/ProductTypeBeanDTO.java
+278
-0
shopping-cart-application-service/src/main/java/cn/freemud/entities/dto/product/ValiadShopProductResult.java
+3
-3
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/mcoffee/ShoppingCartMCoffeeServiceImpl.java
+0
-0
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/mcoffee/calculation/CalculationServiceImpl.java
+8
-5
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/mcoffee/calculation/SetMealCalculation.java
+25
-10
No files found.
.gitignore
View file @
01287fbb
# Created by .ignore support plugin (hsz.mobi)
# Created by .ignore support plugin (hsz.mobi)
.gitignore
.gitignore
.idea/
.idea/
.DS_Store
assortment-ordercenter-sdk/assortment-ordercenter-sdk.iml
assortment-ordercenter-sdk/assortment-ordercenter-sdk.iml
assortment-ordercenter-sdk/target/
assortment-ordercenter-sdk/target/
assortment-shoppingcart-sdk/assortment-shoppingcart-sdk.iml
assortment-shoppingcart-sdk/assortment-shoppingcart-sdk.iml
...
...
assortment-shoppingcart-sdk/src/main/java/com/freemud/sdk/api/assortment/shoppingcart/constant/ShoppingCartConstant.java
View file @
01287fbb
...
@@ -61,5 +61,9 @@ public class ShoppingCartConstant {
...
@@ -61,5 +61,9 @@ public class ShoppingCartConstant {
public
static
final
int
PRODUCT_GROUP_EMPTY
=
109
;
public
static
final
int
PRODUCT_GROUP_EMPTY
=
109
;
public
static
final
String
CART_PRODUCT_GROUP_EMPTY_STATE
=
"您选择的【$spuName】商品有未选商品"
;
public
static
final
String
CART_PRODUCT_GROUP_EMPTY_STATE
=
"您选择的【$spuName】商品有未选商品"
;
/**
* 可选商品价格校验失败
*/
public
static
final
int
PRODUCT_GROUP_PRICE_CHANGE
=
113
;
}
}
shopping-cart-application-service/src/main/java/cn/freemud/adapter/ShoppingCartConvertAdapter.java
View file @
01287fbb
This diff is collapsed.
Click to expand it.
shopping-cart-application-service/src/main/java/cn/freemud/adapter/ShoppingCartMccafeAdapter.java
0 → 100644
View file @
01287fbb
This diff is collapsed.
Click to expand it.
shopping-cart-application-service/src/main/java/cn/freemud/entities/dto/product/ProductTypeBeanDTO.java
0 → 100644
View file @
01287fbb
package
cn
.
freemud
.
entities
.
dto
.
product
;
import
lombok.Data
;
import
java.util.List
;
/**
* All rights Reserved, Designed By sunary.site
*
* @version v1.0
* @Title: IntelliJ IDEA
* @Package cn.freemud.entities.dto.product
* @Description: 请简单描述下这个类是做什么用的
* @author: yu.sun
* @date: 2020-11-25 11:51:44
* @Copyright: 2019 www.freemud.cn Inc. All rights reserved.
*/
@Data
public
class
ProductTypeBeanDTO
{
private
String
businessNo
;
private
String
barcode
;
private
String
brandId
;
private
String
brandName
;
private
String
category
;
private
String
categoryName
;
private
String
companyId
;
private
String
customerCode
;
private
String
productCode
;
private
Long
finalPrice
;
private
Integer
isSkuProduct
;
private
String
name
;
private
Long
originalPrice
;
private
Long
packPrice
;
private
String
picture
;
private
String
pid
;
private
String
specification
;
private
Integer
status
;
private
Integer
stock
;
private
Integer
stockLimit
;
private
int
type
;
private
String
unit
;
private
Integer
riseSell
;
private
String
rawMaterial
;
private
Double
tax
;
private
String
taxId
;
private
Integer
openMemberDiscount
;
private
Integer
memberDiscount
;
private
List
<
ProductAttributeGroupListBean
>
productAttributeGroupList
;
private
List
<
ProductPictureListBean
>
productPictureList
;
private
List
<
SkuProductBean
>
skuList
;
private
List
<
ProductComboType
>
productComboList
;
private
List
<
ProductGroupType
>
productGroupList
;
private
List
<
SkuProductBean
.
SkuSpecValue
>
skuSpecValues
;
private
List
<
PackageProductTypeDto
>
packageProductTypes
;
private
List
<
ProductGroupType
>
additionalGroupList
;
private
List
<
ProductComboDetailTypeDto
>
productComboInfos
;
private
Integer
isDishware
;
private
Integer
weightType
;
private
Double
weight
;
public
Integer
getMemberDiscountResult
()
{
return
this
.
openMemberDiscount
!=
null
&&
this
.
openMemberDiscount
==
1
?
this
.
memberDiscount
:
100
;
}
public
ProductTypeBeanDTO
()
{
}
@Data
public
static
class
ProductComboDetailTypeDto
{
private
String
productId
;
private
Integer
quantity
;
private
Integer
sequence
;
public
ProductComboDetailTypeDto
()
{
}
}
@Data
public
static
class
ProductAttributeGroupListBean
{
private
String
attributeName
;
private
Integer
attributeType
;
private
List
<
AttributeValueBean
>
attributeValues
;
public
ProductAttributeGroupListBean
()
{
}
}
@Data
public
static
class
AttributeValueBean
{
private
String
attributeId
;
private
String
attributeValue
;
private
Long
id
;
private
Long
price
;
private
Integer
sequence
;
private
Integer
status
;
public
AttributeValueBean
()
{
}
}
@Data
public
static
class
PackageProductTypeDto
{
private
Long
groupId
;
private
Integer
sequence
;
public
PackageProductTypeDto
()
{
}
}
@Data
public
static
class
ProductGroupType
{
private
String
pgid
;
private
String
linkId
;
private
String
groupCode
;
private
String
options
;
private
String
name
;
private
Integer
must
;
private
Integer
allowRepeat
;
private
Integer
minNumber
;
private
Integer
maxNumber
;
private
String
remark
;
private
Integer
total
;
private
List
<
ProductGroupType
.
GroupDetailType
>
groupDetail
;
public
ProductGroupType
()
{
}
@Data
public
static
class
GroupDetailType
{
private
String
productId
;
private
String
productName
;
private
String
customerCode
;
private
Integer
productPrice
;
protected
Integer
productFinalPrice
;
protected
Integer
markUpPrice
;
private
String
picture
;
private
Integer
stockLimit
;
protected
String
unit
;
protected
String
productCode
;
private
Integer
weightType
;
private
Double
weight
;
private
Double
tax
;
private
String
taxId
;
}
}
@Data
public
static
class
ProductComboType
{
private
String
productId
;
private
String
productName
;
private
String
customerCode
;
private
Integer
originalPrice
;
protected
Integer
finalPrice
;
protected
Integer
packPrice
;
private
String
picture
;
protected
String
unit
;
protected
String
productCode
;
private
Integer
quantity
;
private
Integer
weightType
;
private
Double
weight
;
private
Double
tax
;
private
String
taxId
;
}
@Data
public
static
class
ProductPictureListBean
{
private
String
pictureId
;
private
String
productId
;
private
String
sequence
;
private
String
type
;
private
String
url
;
@Data
public
static
class
AttributeValueBean
{
private
String
attributeId
;
private
String
attributeValue
;
private
Long
id
;
private
Long
price
;
private
Integer
sequence
;
private
Integer
status
;
public
AttributeValueBean
()
{
}
}
}
@Data
public
static
class
ProductLabelNameListBean
{
private
String
id
;
private
String
name
;
private
String
partnerId
;
List
<?>
productList
;
private
String
storeId
;
private
String
type
;
public
ProductLabelNameListBean
()
{
}
}
@Data
public
static
class
SpecificationGroupBean
{
private
String
partnerId
;
private
Integer
sequence
;
private
String
specId
;
private
String
specName
;
private
List
<
SpecificationGroupBean
.
SpecValueVo
>
specValueVos
;
public
SpecificationGroupBean
()
{
}
@Data
public
static
class
SpecValueVo
{
private
Integer
sequence
;
private
String
specId
;
private
String
specValue
;
private
String
specValueId
;
public
SpecValueVo
()
{
}
}
}
@Data
public
static
class
SkuProductBean
{
private
String
customerCode
;
private
String
productCode
;
private
Long
finalPrice
;
private
Long
originalPrice
;
private
String
productName
;
private
Integer
productType
;
private
Integer
sequence
;
private
String
skuCode
;
private
String
skuId
;
private
Integer
status
;
private
Integer
stockLimit
;
private
Integer
stockQty
;
private
Long
packPrice
;
private
Integer
riseSell
;
private
String
rawMaterial
;
private
Double
tax
;
private
String
taxId
;
private
List
<
SkuProductBean
.
SkuSpecValue
>
skuSpecValues
;
private
List
<
ProductGroupType
>
additionalGroupList
;
private
Double
weight
;
protected
String
unit
;
private
Integer
openMemberDiscount
;
private
Integer
memberDiscount
;
public
Integer
getMemberDiscountResult
()
{
return
this
.
openMemberDiscount
!=
null
&&
this
.
openMemberDiscount
==
1
?
this
.
memberDiscount
:
100
;
}
public
SkuProductBean
()
{
}
@Data
public
static
class
SkuSpecValue
{
private
String
productId
;
private
Integer
sequence
;
private
String
specId
;
private
String
specName
;
private
String
specValue
;
private
String
specValueId
;
public
SkuSpecValue
()
{
}
}
@Data
public
static
class
PackageProductTypeDto
{
private
Long
groupId
;
private
Integer
sequence
;
public
PackageProductTypeDto
()
{
}
}
}
}
shopping-cart-application-service/src/main/java/cn/freemud/entities/dto/product/ValiadShopProductResult.java
View file @
01287fbb
package
cn
.
freemud
.
entities
.
dto
.
product
;
package
cn
.
freemud
.
entities
.
dto
.
product
;
import
com.freemud.application.sdk.api.productcenter.domain.ProductBeanDTO
;
import
lombok.Data
;
import
lombok.Data
;
import
java.util.Map
;
import
java.util.Map
;
...
@@ -24,9 +24,9 @@ public class ValiadShopProductResult {
...
@@ -24,9 +24,9 @@ public class ValiadShopProductResult {
private
String
message
;
private
String
message
;
private
String
skuId
;
private
String
skuId
;
private
String
spuId
;
private
String
spuId
;
private
ProductBeanDTO
productType
;
private
Product
Type
BeanDTO
productType
;
private
String
uuid
;
private
String
uuid
;
private
Map
<
String
,
ProductBeanDTO
>
subProductTypeMap
;
private
Map
<
String
,
Product
Type
BeanDTO
>
subProductTypeMap
;
}
}
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/mcoffee/ShoppingCartMCoffeeServiceImpl.java
View file @
01287fbb
This diff is collapsed.
Click to expand it.
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/mcoffee/calculation/CalculationServiceImpl.java
View file @
01287fbb
...
@@ -412,7 +412,8 @@ public class CalculationServiceImpl {
...
@@ -412,7 +412,8 @@ public class CalculationServiceImpl {
material
.
setType
(
2
);
material
.
setType
(
2
);
material
.
setGoodsId
(
materialGoods
.
getGoodsId
());
material
.
setGoodsId
(
materialGoods
.
getGoodsId
());
material
.
setGoodsQuantity
(
materialGoods
.
getQty
());
material
.
setGoodsQuantity
(
materialGoods
.
getQty
());
material
.
setOriginalPrice
(
materialGoods
.
getFinalPrice
());
material
.
setOriginalPrice
(
null
!=
materialGoods
.
getFinalPrice
()
?
materialGoods
.
getFinalPrice
()
:
0
);
materials
.
add
(
material
);
materials
.
add
(
material
);
}
}
}
}
...
@@ -430,7 +431,8 @@ public class CalculationServiceImpl {
...
@@ -430,7 +431,8 @@ public class CalculationServiceImpl {
material
.
setType
(
1
);
material
.
setType
(
1
);
material
.
setGoodsId
(
materialGoods2
.
getSpuId
());
material
.
setGoodsId
(
materialGoods2
.
getSpuId
());
material
.
setGoodsQuantity
(
1
);
material
.
setGoodsQuantity
(
1
);
material
.
setOriginalPrice
(
materialGoods2
.
getFinalPrice
());
material
.
setOriginalPrice
(
null
!=
materialGoods2
.
getFinalPrice
()
?
materialGoods2
.
getFinalPrice
()
:
0
);
materials
.
add
(
material
);
materials
.
add
(
material
);
}
}
}
}
...
@@ -438,14 +440,15 @@ public class CalculationServiceImpl {
...
@@ -438,14 +440,15 @@ public class CalculationServiceImpl {
}
}
//加料
//加料
if
(
cartGoods
!=
null
&&
CollectionUtils
.
isNotEmpty
(
cartGoods
.
getProductMaterialList
()))
{
if
(
null
!=
cartGoods
&&
CollectionUtils
.
isNotEmpty
(
cartGoods
.
getProductMaterialList
()))
{
for
(
CartGoods
.
MaterialGoods
materialGoods
:
cartGoods
.
getProductMaterialList
())
{
for
(
CartGoods
.
MaterialGoods
materialGoods
:
cartGoods
.
getProductMaterialList
())
{
ActivityCalculationDiscountRequestDto
.
CalculationDiscountGoods
.
Material
material
=
new
ActivityCalculationDiscountRequestDto
.
CalculationDiscountGoods
.
Material
();
ActivityCalculationDiscountRequestDto
.
CalculationDiscountGoods
.
Material
material
=
new
ActivityCalculationDiscountRequestDto
.
CalculationDiscountGoods
.
Material
();
material
.
setType
(
1
);
material
.
setType
(
1
);
material
.
setGoodsId
(
materialGoods
.
getSpuId
());
material
.
setGoodsId
(
materialGoods
.
getSpuId
());
material
.
setGoodsQuantity
(
1
);
material
.
setGoodsQuantity
(
1
);
material
.
setOriginalPrice
(
materialGoods
.
getOriginalPrice
());
material
.
setOriginalPrice
(
null
!=
materialGoods
.
getOriginalPrice
()
?
material
.
setNowPrice
(
materialGoods
.
getFinalPrice
().
intValue
());
materialGoods
.
getOriginalPrice
()
:
0
);
material
.
setNowPrice
(
null
!=
materialGoods
.
getFinalPrice
()
?
materialGoods
.
getFinalPrice
().
intValue
():
0
);
materials
.
add
(
material
);
materials
.
add
(
material
);
}
}
}
}
...
...
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/mcoffee/calculation/SetMealCalculation.java
View file @
01287fbb
package
cn
.
freemud
.
service
.
impl
.
mcoffee
.
calculation
;
package
cn
.
freemud
.
service
.
impl
.
mcoffee
.
calculation
;
import
cn.freemud.adapter.ShoppingCartConvertAdapter
;
import
cn.freemud.adapter.ShoppingCartConvertAdapter
;
import
cn.freemud.adapter.ShoppingCartMccafeAdapter
;
import
cn.freemud.entities.dto.ActivityCalculationDiscountResponseDto
;
import
cn.freemud.entities.dto.ActivityCalculationDiscountResponseDto
;
import
cn.freemud.entities.dto.UserLoginInfoDto
;
import
cn.freemud.entities.dto.UserLoginInfoDto
;
import
cn.freemud.entities.dto.activity.ActivityDiscountsDto
;
import
cn.freemud.entities.dto.activity.ActivityDiscountsDto
;
...
@@ -38,6 +39,8 @@ public class SetMealCalculation {
...
@@ -38,6 +39,8 @@ public class SetMealCalculation {
@Autowired
@Autowired
private
ShoppingCartConvertAdapter
shoppingCartConvertAdapter
;
private
ShoppingCartConvertAdapter
shoppingCartConvertAdapter
;
@Autowired
private
ShoppingCartMccafeAdapter
shoppingCartMccafeAdapter
;
public
void
updateShoppingCartGoodsDiscount
(
ActivityCalculationDiscountResponseDto
.
CalculationDiscountResult
calculationDiscountResult
,
List
<
CartGoods
>
cartGoodsList
,
ShoppingCartGoodsResponseVo
shoppingCartGoodsResponseVo
)
{
public
void
updateShoppingCartGoodsDiscount
(
ActivityCalculationDiscountResponseDto
.
CalculationDiscountResult
calculationDiscountResult
,
List
<
CartGoods
>
cartGoodsList
,
ShoppingCartGoodsResponseVo
shoppingCartGoodsResponseVo
)
{
...
@@ -62,11 +65,15 @@ public class SetMealCalculation {
...
@@ -62,11 +65,15 @@ public class SetMealCalculation {
cartGoods
.
setPackPrice
(
cartGoods
.
getPackPrice
()
*
cartGoods
.
getQty
());
cartGoods
.
setPackPrice
(
cartGoods
.
getPackPrice
()
*
cartGoods
.
getQty
());
// 可选商品现总价
// 可选商品现总价
productGroupTotalAmount
=
0
l
;
productGroupTotalAmount
=
0
l
;
long
productGroupAmount
=
cartGoods
.
getProductGroupList
().
stream
().
mapToLong
(
t
->
t
.
getFinalPrice
()
*
t
.
getQty
()).
sum
();
long
productGroupAmount
=
null
==
cartGoods
.
getProductGroupList
()
?
0
:
cartGoods
.
getProductGroupList
().
stream
().
mapToLong
(
t
->
(
null
!=
t
.
getFinalPrice
()
?
t
.
getFinalPrice
():
0
)
*
(
null
!=
t
.
getQty
()
?
t
.
getQty
():
0
)).
sum
();
productGroupTotalAmount
+=
productGroupAmount
*
cartGoods
.
getQty
();
productGroupTotalAmount
+=
productGroupAmount
*
cartGoods
.
getQty
();
// 固定商品现总价
// 固定商品现总价
long
productComboAmount
=
cartGoods
.
getProductComboList
().
stream
().
mapToLong
(
t
->
t
.
getFinalPrice
()
*
t
.
getQty
()).
sum
();
long
productComboAmount
=
cartGoods
.
getProductComboList
().
stream
().
mapToLong
(
t
->
(
null
!=
t
.
getFinalPrice
()
?
t
.
getFinalPrice
():
0
)
*
(
null
!=
t
.
getQty
()
?
t
.
getQty
():
0
)).
sum
();
long
productComboTotalAmount
=
productComboAmount
*
cartGoods
.
getQty
();
long
productComboTotalAmount
=
productComboAmount
*
cartGoods
.
getQty
();
long
materialPrice
=
0
l
;
long
materialPrice
=
0
l
;
...
@@ -76,18 +83,26 @@ public class SetMealCalculation {
...
@@ -76,18 +83,26 @@ public class SetMealCalculation {
Long
comboxmaterialPrice
=
0L
;
Long
comboxmaterialPrice
=
0L
;
if
(
CollectionUtils
.
isNotEmpty
(
comboxGoods
.
getProductMaterialList
())){
if
(
CollectionUtils
.
isNotEmpty
(
comboxGoods
.
getProductMaterialList
())){
for
(
CartGoods
.
MaterialGoods
materialGoods
:
comboxGoods
.
getProductMaterialList
()){
for
(
CartGoods
.
MaterialGoods
materialGoods
:
comboxGoods
.
getProductMaterialList
()){
comboxmaterialPrice
+=
materialGoods
.
getFinalPrice
()
*
cartGoods
.
getQty
()
;
comboxmaterialPrice
+=
null
!=
materialGoods
.
getFinalPrice
()
?
materialGoods
.
getFinalPrice
()
*
cartGoods
.
getQty
()
:
0
;
}
}
}
}
comboxGoods
.
setAmount
(
comboxGoods
.
getAmount
()+
comboxmaterialPrice
);
comboxGoods
.
setAmount
((
null
==
comboxGoods
.
getAmount
()
?
0
:
comboxGoods
.
getAmount
())+
comboxmaterialPrice
);
materialPrice
=
materialPrice
+
comboxmaterialPrice
;
materialPrice
=
materialPrice
+
comboxmaterialPrice
;
}
}
}
}
cartGoods
.
setOriginalAmount
(
productGroupTotalAmount
+
productComboTotalAmount
+
materialPrice
);
cartGoods
.
setOriginalPrice
(
productComboTotalAmount
);
Long
amount
=
null
!=
cartGoods
.
getFinalPrice
()
?
cartGoods
.
getFinalPrice
()*
cartGoods
.
getQty
()
+
productGroupTotalAmount
+
materialPrice
:
cartGoods
.
setAmount
(
productGroupTotalAmount
+
productComboTotalAmount
+
materialPrice
);
productGroupTotalAmount
+
productComboTotalAmount
+
materialPrice
;
cartGoods
.
setFinalPrice
(
productComboTotalAmount
);
Long
comboOriginalPriceAmount
=
null
!=
cartGoods
.
getOriginalAmount
()
?
cartGoods
.
getOriginalAmount
()
:
productComboTotalAmount
;
cartGoods
.
setOriginalAmount
(
productGroupTotalAmount
+
comboOriginalPriceAmount
+
materialPrice
);
cartGoods
.
setOriginalPrice
(
null
!=
cartGoods
.
getOriginalPrice
()
?
cartGoods
.
getOriginalPrice
()
:
productComboTotalAmount
);
cartGoods
.
setAmount
(
amount
);
cartGoods
.
setFinalPrice
(
null
!=
cartGoods
.
getFinalPrice
()
?
cartGoods
.
getFinalPrice
()
:
productComboTotalAmount
);
// 套餐(固定商品)现价
// 套餐(固定商品)现价
// String toastMsg = getTotalAmount(cartGoods, productGroupAmount, numberMap, goodsMap);
// String toastMsg = getTotalAmount(cartGoods, productGroupAmount, numberMap, goodsMap);
...
@@ -131,11 +146,11 @@ public class SetMealCalculation {
...
@@ -131,11 +146,11 @@ public class SetMealCalculation {
int
productGroupDiscountAmount
=
cartGoods
.
getProductGroupList
().
stream
().
mapToInt
(
t
->
t
.
getFinalPrice
().
intValue
()
*
t
.
getQty
()).
sum
();
int
productGroupDiscountAmount
=
cartGoods
.
getProductGroupList
().
stream
().
mapToInt
(
t
->
t
.
getFinalPrice
().
intValue
()
*
t
.
getQty
()).
sum
();
// totalDiscountAmount += discountAmount - productGroupDiscountAmount * cartGoods.getQty();
// totalDiscountAmount += discountAmount - productGroupDiscountAmount * cartGoods.getQty();
// 添加套餐父商品
// 添加套餐父商品
ShoppingCartGoodsDto
.
CartGoodsDetailDto
parentCartGoods
=
shoppingCart
Convert
Adapter
.
convertCartGoods2DetailGoods
(
cartGoods
,
apportionGoods
,
duplicateGoodsMap
);
ShoppingCartGoodsDto
.
CartGoodsDetailDto
parentCartGoods
=
shoppingCart
Mccafe
Adapter
.
convertCartGoods2DetailGoods
(
cartGoods
,
apportionGoods
,
duplicateGoodsMap
);
// parentCartGoods.setTotalDiscountAmount(parentCartGoods.getTotalDiscountAmount()+ cartGoods.getOriginalAmount().intValue() - cartGoods.getAmount().intValue());
// parentCartGoods.setTotalDiscountAmount(parentCartGoods.getTotalDiscountAmount()+ cartGoods.getOriginalAmount().intValue() - cartGoods.getAmount().intValue());
// parentCartGoods.getActivityDiscountsDtos().add(getActivityDiscountsDto(discountAmount - productGroupDiscountAmount * cartGoods.getQty()));
// parentCartGoods.getActivityDiscountsDtos().add(getActivityDiscountsDto(discountAmount - productGroupDiscountAmount * cartGoods.getQty()));
// 添加套餐固定商品&可选商品: 做均摊
// 添加套餐固定商品&可选商品: 做均摊
parentCartGoods
.
setComboProducts
(
shoppingCart
Convert
Adapter
.
convertComboxGoods2DetailGoods
(
cartGoods
,
parentCartGoods
.
getTotalDiscountAmount
()));
parentCartGoods
.
setComboProducts
(
shoppingCart
Mccafe
Adapter
.
convertComboxGoods2DetailGoods
(
cartGoods
,
parentCartGoods
.
getTotalDiscountAmount
()));
cartGoodsDetailDtos
.
add
(
parentCartGoods
);
cartGoodsDetailDtos
.
add
(
parentCartGoods
);
}
}
}
}
...
...
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