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
5b116545
Commit
5b116545
authored
Oct 22, 2020
by
ping.wu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
加料商品键位修改
parent
6339f1a9
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
11 deletions
+16
-11
shopping-cart-application-service/src/main/java/cn/freemud/adapter/ShoppingCartConvertAdapter.java
+9
-10
shopping-cart-application-service/src/main/java/cn/freemud/entities/dto/ActivityCalculationDiscountResponseDto.java
+1
-1
shopping-cart-application-service/src/main/java/cn/freemud/entities/vo/CartGoods.java
+6
-0
No files found.
shopping-cart-application-service/src/main/java/cn/freemud/adapter/ShoppingCartConvertAdapter.java
View file @
5b116545
...
@@ -921,16 +921,15 @@ public class ShoppingCartConvertAdapter {
...
@@ -921,16 +921,15 @@ public class ShoppingCartConvertAdapter {
List
<
com
.
freemud
.
sdk
.
api
.
assortment
.
shoppingcart
.
domain
.
CartGoods
.
MaterialGoods
>
productMaterialList
=
new
ArrayList
<>();
List
<
com
.
freemud
.
sdk
.
api
.
assortment
.
shoppingcart
.
domain
.
CartGoods
.
MaterialGoods
>
productMaterialList
=
new
ArrayList
<>();
for
(
com
.
freemud
.
sdk
.
api
.
assortment
.
shoppingcart
.
domain
.
CartGoods
.
MaterialGoods
productMaterial
:
comboxGoods
.
getProductMaterialList
()){
for
(
com
.
freemud
.
sdk
.
api
.
assortment
.
shoppingcart
.
domain
.
CartGoods
.
MaterialGoods
productMaterial
:
comboxGoods
.
getProductMaterialList
()){
for
(
ProductBeanDTO
.
ProductGroupType
.
GroupDetailType
groupDetailType
:
groupDetail
){
for
(
ProductBeanDTO
.
ProductGroupType
.
GroupDetailType
groupDetailType
:
groupDetail
){
if
(
groupDetailType
.
getProductId
().
equals
(
productMaterial
.
getSpuId
())){
if
(
groupDetailType
.
getProductId
().
equals
(
productMaterial
.
getSpuId
())
&&
productMaterial
.
getAmount
()
==
null
){
com
.
freemud
.
sdk
.
api
.
assortment
.
shoppingcart
.
domain
.
CartGoods
.
MaterialGoods
materialGoods
=
new
com
.
freemud
.
sdk
.
api
.
assortment
.
shoppingcart
.
domain
.
CartGoods
.
MaterialGoods
();
productMaterial
.
setSpuId
(
groupDetailType
.
getProductId
());
materialGoods
.
setSpuId
(
groupDetailType
.
getProductId
());
productMaterial
.
setAmount
(
groupDetailType
.
getProductPrice
().
longValue
());
materialGoods
.
setAmount
(
groupDetailType
.
getProductPrice
().
longValue
());
productMaterial
.
setFinalPrice
(
groupDetailType
.
getProductFinalPrice
().
longValue
());
materialGoods
.
setFinalPrice
(
groupDetailType
.
getProductFinalPrice
().
longValue
());
productMaterial
.
setOriginalAmount
(
groupDetailType
.
getProductPrice
().
longValue
());
materialGoods
.
setOriginalAmount
(
groupDetailType
.
getProductPrice
().
longValue
());
productMaterial
.
setOriginalPrice
(
groupDetailType
.
getProductPrice
().
longValue
());
materialGoods
.
setOriginalPrice
(
groupDetailType
.
getProductPrice
().
longValue
());
productMaterial
.
setSpuName
(
groupDetailType
.
getProductName
());
materialGoods
.
setSpuName
(
groupDetailType
.
getProductName
());
productMaterial
.
setKeyWord
(
productMaterial
.
getKeyWord
());
materialGoods
.
setKeyWord
(
productMaterial
.
getKeyWord
());
productMaterialList
.
add
(
productMaterial
);
productMaterialList
.
add
(
materialGoods
);
}
}
}
}
}
}
...
...
shopping-cart-application-service/src/main/java/cn/freemud/entities/dto/ActivityCalculationDiscountResponseDto.java
View file @
5b116545
...
@@ -242,7 +242,7 @@ public class ActivityCalculationDiscountResponseDto {
...
@@ -242,7 +242,7 @@ public class ActivityCalculationDiscountResponseDto {
}
}
@Data
@Data
public
class
GoodsMaterial
{
public
static
class
GoodsMaterial
{
/**
/**
* 子商品类型:1-小料;2-可选商品
* 子商品类型:1-小料;2-可选商品
*/
*/
...
...
shopping-cart-application-service/src/main/java/cn/freemud/entities/vo/CartGoods.java
View file @
5b116545
...
@@ -376,6 +376,9 @@ public class CartGoods {
...
@@ -376,6 +376,9 @@ public class CartGoods {
if
(
CollectionUtils
.
isNotEmpty
(
goods
.
getSpecialExtra
()))
{
if
(
CollectionUtils
.
isNotEmpty
(
goods
.
getSpecialExtra
()))
{
goods
.
getSpecialExtra
().
stream
().
sorted
(
Comparator
.
comparing
(
SpecialExtra:
:
getAttributeId
)).
forEach
(
e
->
originalString
.
append
(
e
.
getAttributeId
()));
goods
.
getSpecialExtra
().
stream
().
sorted
(
Comparator
.
comparing
(
SpecialExtra:
:
getAttributeId
)).
forEach
(
e
->
originalString
.
append
(
e
.
getAttributeId
()));
}
}
if
(
CollectionUtils
.
isNotEmpty
(
goods
.
getProductMaterialList
()))
{
goods
.
getProductMaterialList
().
stream
().
sorted
(
Comparator
.
comparing
(
MaterialGoods:
:
getSpuId
)).
forEach
(
e
->
originalString
.
append
(
e
.
getSpuId
()));
}
}
}
}
}
if
(
CollectionUtils
.
isNotEmpty
(
productGroupList
))
{
if
(
CollectionUtils
.
isNotEmpty
(
productGroupList
))
{
...
@@ -404,6 +407,9 @@ public class CartGoods {
...
@@ -404,6 +407,9 @@ public class CartGoods {
if
(
CollectionUtils
.
isNotEmpty
(
goods
.
getSpecialExtra
()))
{
if
(
CollectionUtils
.
isNotEmpty
(
goods
.
getSpecialExtra
()))
{
goods
.
getSpecialExtra
().
stream
().
sorted
(
Comparator
.
comparing
(
SpecialExtra:
:
getAttributeId
)).
forEach
(
e
->
currentString
.
append
(
e
.
getAttributeId
()));
goods
.
getSpecialExtra
().
stream
().
sorted
(
Comparator
.
comparing
(
SpecialExtra:
:
getAttributeId
)).
forEach
(
e
->
currentString
.
append
(
e
.
getAttributeId
()));
}
}
if
(
CollectionUtils
.
isNotEmpty
(
goods
.
getProductMaterialList
()))
{
goods
.
getProductMaterialList
().
stream
().
sorted
(
Comparator
.
comparing
(
MaterialGoods:
:
getSpuId
)).
forEach
(
e
->
currentString
.
append
(
e
.
getSpuId
()));
}
}
}
}
}
if
(
CollectionUtils
.
isNotEmpty
(
cartGoods
.
getProductGroupList
()))
{
if
(
CollectionUtils
.
isNotEmpty
(
cartGoods
.
getProductGroupList
()))
{
...
...
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