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
a5e0238b
Commit
a5e0238b
authored
Aug 15, 2020
by
xiaoer.li
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
将小料异常标识在行记录上
parent
1c4d5058
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
3 deletions
+12
-3
assortment-shoppingcart-sdk/src/main/java/com/freemud/sdk/api/assortment/shoppingcart/adapter/ShoppingCartAdapter.java
+10
-2
assortment-shoppingcart-sdk/src/main/java/com/freemud/sdk/api/assortment/shoppingcart/constant/GoodsTypeEnum.java
+2
-1
No files found.
assortment-shoppingcart-sdk/src/main/java/com/freemud/sdk/api/assortment/shoppingcart/adapter/ShoppingCartAdapter.java
View file @
a5e0238b
...
...
@@ -333,7 +333,7 @@ public class ShoppingCartAdapter {
}
/**
* 单独处理加料
* 单独处理加料
及标识小料信息是否有变化
*
* @param cartGoods
* @param spuProduct
...
...
@@ -343,16 +343,24 @@ public class ShoppingCartAdapter {
if
(
CollectionUtils
.
isEmpty
(
cartGoods
.
getProductMaterialList
()))
return
;
//加料信息为空
if
(
CollectionUtils
.
isEmpty
(
spuProduct
.
getAdditionalGroupList
()))
{
cartGoods
.
setGoodsType
(
GoodsTypeEnum
.
EXCEPTION_GOODS
.
getGoodsType
());
cartGoods
.
setProductMaterialList
(
new
ArrayList
<>());
return
;
}
//提取加料信息
List
<
String
>
materialSpu
=
new
ArrayList
<>();
List
<
ProductBeanDTO
.
ProductGroupType
.
GroupDetailType
>
groupDetail
=
spuProduct
.
getAdditionalGroupList
().
get
(
0
).
getGroupDetail
();
HashMap
<
String
,
ProductBeanDTO
.
ProductGroupType
.
GroupDetailType
>
materialHash
=
new
HashMap
<>();
for
(
ProductBeanDTO
.
ProductGroupType
.
GroupDetailType
groupDetailType
:
groupDetail
)
{
materialHash
.
put
(
groupDetailType
.
getProductId
(),
groupDetailType
);
materialSpu
.
add
(
groupDetailType
.
getProductId
());
}
//加车小料和商品小料没有交集则提示商品信息有异常
if
(
CollectionUtils
.
isEmpty
(
cartGoods
.
getProductMaterialList
().
stream
().
filter
(
e
->
materialSpu
.
contains
(
e
.
getSpuId
())).
collect
(
Collectors
.
toList
())))
{
cartGoods
.
setGoodsType
(
GoodsTypeEnum
.
EXCEPTION_GOODS
.
getGoodsType
());
cartGoods
.
setProductMaterialList
(
new
ArrayList
<>());
return
;
}
ArrayList
<
CartGoods
.
MaterialGoods
>
materialGoodsList
=
new
ArrayList
<>();
Long
materialAmount
=
0L
;
Long
originalMaterAmount
=
0L
;
...
...
assortment-shoppingcart-sdk/src/main/java/com/freemud/sdk/api/assortment/shoppingcart/constant/GoodsTypeEnum.java
View file @
a5e0238b
...
...
@@ -19,7 +19,8 @@ public enum GoodsTypeEnum {
COUPON_GOODS
(
2
,
"商品券"
),
SET_MEAL_GOODS
(
3
,
"套餐商品"
),
SKU_GOODS
(
4
,
"sku商品"
),
SPU_GOODS
(
5
,
"spu商品"
);
SPU_GOODS
(
5
,
"spu商品"
),
EXCEPTION_GOODS
(
99
,
"异常商品:商品菜单变化导致和购物车不商品匹配"
);
private
Integer
goodsType
;
private
String
desc
;
...
...
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