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
36338125
Commit
36338125
authored
Oct 07, 2020
by
ping.wu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
套餐可选商品空键位
parent
8a745e29
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
28 additions
and
1 deletions
+28
-1
shopping-cart-application-service/src/main/java/cn/freemud/adapter/ShoppingCartConvertAdapter.java
+6
-1
shopping-cart-application-service/src/main/java/cn/freemud/entities/vo/ComboxGoodsRequestVo.java
+5
-0
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/mcoffee/ShoppingCartMCoffeeServiceImpl.java
+14
-0
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/mcoffee/calculation/CalculationServiceImpl.java
+3
-0
No files found.
shopping-cart-application-service/src/main/java/cn/freemud/adapter/ShoppingCartConvertAdapter.java
View file @
36338125
...
@@ -533,6 +533,9 @@ public class ShoppingCartConvertAdapter {
...
@@ -533,6 +533,9 @@ public class ShoppingCartConvertAdapter {
List
<
ValidateSkuProductType
>
result
=
new
ArrayList
<>();
List
<
ValidateSkuProductType
>
result
=
new
ArrayList
<>();
if
(
CollectionUtils
.
isNotEmpty
(
productComboList
))
{
if
(
CollectionUtils
.
isNotEmpty
(
productComboList
))
{
for
(
com
.
freemud
.
sdk
.
api
.
assortment
.
shoppingcart
.
domain
.
CartGoods
.
ComboxGoods
comboxGoods
:
productComboList
)
{
for
(
com
.
freemud
.
sdk
.
api
.
assortment
.
shoppingcart
.
domain
.
CartGoods
.
ComboxGoods
comboxGoods
:
productComboList
)
{
if
(
"0"
.
equals
(
comboxGoods
.
getGoodsId
())){
continue
;
}
ValidateSkuProductType
validateSkuProductType
=
new
ValidateSkuProductType
();
ValidateSkuProductType
validateSkuProductType
=
new
ValidateSkuProductType
();
validateSkuProductType
.
setProductId
(
StringUtils
.
isNotEmpty
(
comboxGoods
.
getSpuId
())
?
comboxGoods
.
getSpuId
()
:
comboxGoods
.
getSkuId
());
validateSkuProductType
.
setProductId
(
StringUtils
.
isNotEmpty
(
comboxGoods
.
getSpuId
())
?
comboxGoods
.
getSpuId
()
:
comboxGoods
.
getSkuId
());
validateSkuProductType
.
setSkuId
(
comboxGoods
.
getSkuId
());
validateSkuProductType
.
setSkuId
(
comboxGoods
.
getSkuId
());
...
@@ -659,7 +662,9 @@ public class ShoppingCartConvertAdapter {
...
@@ -659,7 +662,9 @@ public class ShoppingCartConvertAdapter {
* @return
* @return
*/
*/
private
void
updateComboxGoodsInfoForMCoffee
(
com
.
freemud
.
sdk
.
api
.
assortment
.
shoppingcart
.
domain
.
CartGoods
.
ComboxGoods
comboxGoods
,
ProductBeanDTO
parentProductBean
,
boolean
isComboxGoods
)
{
private
void
updateComboxGoodsInfoForMCoffee
(
com
.
freemud
.
sdk
.
api
.
assortment
.
shoppingcart
.
domain
.
CartGoods
.
ComboxGoods
comboxGoods
,
ProductBeanDTO
parentProductBean
,
boolean
isComboxGoods
)
{
if
(
"0"
.
equals
(
comboxGoods
.
getGoodsId
())){
return
;
}
ProductBeanDTO
.
ProductComboType
productComboType
=
new
ProductBeanDTO
.
ProductComboType
();
ProductBeanDTO
.
ProductComboType
productComboType
=
new
ProductBeanDTO
.
ProductComboType
();
ProductBeanDTO
.
ProductGroupType
.
GroupDetailType
groupDetailType
=
new
ProductBeanDTO
.
ProductGroupType
.
GroupDetailType
();
ProductBeanDTO
.
ProductGroupType
.
GroupDetailType
groupDetailType
=
new
ProductBeanDTO
.
ProductGroupType
.
GroupDetailType
();
if
(
isComboxGoods
)
{
if
(
isComboxGoods
)
{
...
...
shopping-cart-application-service/src/main/java/cn/freemud/entities/vo/ComboxGoodsRequestVo.java
View file @
36338125
...
@@ -30,6 +30,11 @@ public class ComboxGoodsRequestVo {
...
@@ -30,6 +30,11 @@ public class ComboxGoodsRequestVo {
* 商品组Id
* 商品组Id
*/
*/
private
String
productGroupId
;
private
String
productGroupId
;
/**
* 麦咖啡空键位
*/
private
String
emptyKey
;
/**
/**
* 商品额外的属性
* 商品额外的属性
*/
*/
...
...
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/mcoffee/ShoppingCartMCoffeeServiceImpl.java
View file @
36338125
...
@@ -1037,6 +1037,20 @@ public class ShoppingCartMCoffeeServiceImpl {
...
@@ -1037,6 +1037,20 @@ public class ShoppingCartMCoffeeServiceImpl {
productCombox
.
setExtra
(
vo
.
getExtra
());
productCombox
.
setExtra
(
vo
.
getExtra
());
productCombox
.
setSpecialExtra
(
vo
.
getSpecialExtra
());
productCombox
.
setSpecialExtra
(
vo
.
getSpecialExtra
());
productCombox
.
setProductGroupId
(
StringUtils
.
isEmpty
(
vo
.
getProductGroupId
())
?
null
:
Long
.
parseLong
(
vo
.
getProductGroupId
()));
productCombox
.
setProductGroupId
(
StringUtils
.
isEmpty
(
vo
.
getProductGroupId
())
?
null
:
Long
.
parseLong
(
vo
.
getProductGroupId
()));
if
(
StringUtils
.
isNotEmpty
(
vo
.
getEmptyKey
())){
productCombox
.
setGoodsId
(
"0"
);
productCombox
.
setSkuId
(
"0"
);
productCombox
.
setSpuId
(
"0"
);
productCombox
.
setCustomerCode
(
vo
.
getEmptyKey
());
productCombox
.
setName
(
"无"
);
productCombox
.
setSpuName
(
"无"
);
productCombox
.
setSkuName
(
"无"
);
productCombox
.
setFinalPrice
(
0L
);
productCombox
.
setOriginalPrice
(
0L
);
productCombox
.
setOriginalAmount
(
0L
);
productCombox
.
setAmount
(
0L
);
productCombox
.
setQty
(
1
);
}
//加料商品集
//加料商品集
if
(
CollectionUtils
.
isNotEmpty
(
vo
.
getProductMaterialList
()))
{
if
(
CollectionUtils
.
isNotEmpty
(
vo
.
getProductMaterialList
()))
{
List
<
CartGoods
.
MaterialGoods
>
comboxMaterialGoodsList
=
new
ArrayList
<>();
List
<
CartGoods
.
MaterialGoods
>
comboxMaterialGoodsList
=
new
ArrayList
<>();
...
...
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/mcoffee/calculation/CalculationServiceImpl.java
View file @
36338125
...
@@ -376,6 +376,9 @@ public class CalculationServiceImpl {
...
@@ -376,6 +376,9 @@ public class CalculationServiceImpl {
//可选搭配
//可选搭配
if
(
cartGoods
!=
null
&&
CollectionUtils
.
isNotEmpty
(
cartGoods
.
getProductGroupList
()))
{
if
(
cartGoods
!=
null
&&
CollectionUtils
.
isNotEmpty
(
cartGoods
.
getProductGroupList
()))
{
for
(
CartGoods
.
ComboxGoods
materialGoods
:
cartGoods
.
getProductGroupList
())
{
for
(
CartGoods
.
ComboxGoods
materialGoods
:
cartGoods
.
getProductGroupList
())
{
if
(
"0"
.
equals
(
materialGoods
.
getGoodsId
())){
continue
;
}
ActivityCalculationDiscountRequestDto
.
CalculationDiscountGoods
.
Material
material
=
new
ActivityCalculationDiscountRequestDto
.
CalculationDiscountGoods
.
Material
();
ActivityCalculationDiscountRequestDto
.
CalculationDiscountGoods
.
Material
material
=
new
ActivityCalculationDiscountRequestDto
.
CalculationDiscountGoods
.
Material
();
material
.
setType
(
2
);
material
.
setType
(
2
);
material
.
setGoodsId
(
materialGoods
.
getGoodsId
());
material
.
setGoodsId
(
materialGoods
.
getGoodsId
());
...
...
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