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
37088832
Commit
37088832
authored
Oct 29, 2020
by
徐康
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature/20200915_麦咖啡p2v3活动入机增加TENDERID字段' into feature-yu.sun-material-20201030
parents
a0b17af8
9d26c074
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
77 additions
and
34 deletions
+77
-34
assortment-ordercenter-sdk/src/main/java/com/freemud/sdk/api/assortment/order/adapter/OrderSdkAdapter.java
+3
-4
assortment-ordercenter-sdk/src/main/java/com/freemud/sdk/api/assortment/order/request/order/CreateOrderProductRequest.java
+0
-2
assortment-ordercenter-sdk/src/main/java/com/freemud/sdk/api/assortment/order/request/order/OrderProductAddInfoDto.java
+0
-2
assortment-ordercenter-sdk/src/main/java/com/freemud/sdk/api/assortment/order/request/order/OrderSpecialExtraAttrRequest.java
+4
-0
order-application-service/src/main/java/cn/freemud/adapter/DeliveryAdapter.java
+40
-4
order-application-service/src/main/java/cn/freemud/adapter/OrderAdapter.java
+30
-22
No files found.
assortment-ordercenter-sdk/src/main/java/com/freemud/sdk/api/assortment/order/adapter/OrderSdkAdapter.java
View file @
37088832
...
@@ -1914,6 +1914,8 @@ public class OrderSdkAdapter {
...
@@ -1914,6 +1914,8 @@ public class OrderSdkAdapter {
newOrderAccountType
=
OldOrderAccountType
.
TOTAL_DISCOUNT
.
getCode
();
newOrderAccountType
=
OldOrderAccountType
.
TOTAL_DISCOUNT
.
getCode
();
case
220
:
case
220
:
newOrderAccountType
=
OldOrderAccountType
.
MEMBER_PRICE_DISCOUNT
.
getCode
();
newOrderAccountType
=
OldOrderAccountType
.
MEMBER_PRICE_DISCOUNT
.
getCode
();
case
99
:
newOrderAccountType
=
OldOrderAccountType
.
FREIGHT_COUPON
.
getCode
();
default
:
default
:
break
;
break
;
}
}
...
@@ -2608,6 +2610,7 @@ public class OrderSdkAdapter {
...
@@ -2608,6 +2610,7 @@ public class OrderSdkAdapter {
return
originalAmount
;
return
originalAmount
;
}
}
Integer
index
=
1
;
Integer
index
=
1
;
Integer
comboIndex
=
1
;
for
(
CreateOrderProductRequest
productRequest
:
products
)
{
for
(
CreateOrderProductRequest
productRequest
:
products
)
{
// 普通商品 订单转换
// 普通商品 订单转换
productRequest
.
setOpid
(
index
);
productRequest
.
setOpid
(
index
);
...
@@ -2617,7 +2620,6 @@ public class OrderSdkAdapter {
...
@@ -2617,7 +2620,6 @@ public class OrderSdkAdapter {
// 父类商品productId=productId+seq
// 父类商品productId=productId+seq
String
parentProductId
=
productRequest
.
getProductId
()
+
"_"
+
index
;
String
parentProductId
=
productRequest
.
getProductId
()
+
"_"
+
index
;
if
(
CollectionUtils
.
isNotEmpty
(
productRequest
.
getComboProduct
()))
{
if
(
CollectionUtils
.
isNotEmpty
(
productRequest
.
getComboProduct
()))
{
Integer
comboIndex
=
1
;
for
(
CreateOrderProductRequest
combo
:
productRequest
.
getComboProduct
())
{
for
(
CreateOrderProductRequest
combo
:
productRequest
.
getComboProduct
())
{
combo
.
setOpid
(
comboIndex
);
combo
.
setOpid
(
comboIndex
);
updateOrderItemAndSettlement
(
orderItemList
,
orderSettlementCreateReqList
,
combo
,
partnerId
,
parentProductId
,
false
);
updateOrderItemAndSettlement
(
orderItemList
,
orderSettlementCreateReqList
,
combo
,
partnerId
,
parentProductId
,
false
);
...
@@ -2766,9 +2768,6 @@ public class OrderSdkAdapter {
...
@@ -2766,9 +2768,6 @@ public class OrderSdkAdapter {
extInfo
.
setThirdCensusCategoryId
(
product
.
getClassificationId
());
extInfo
.
setThirdCensusCategoryId
(
product
.
getClassificationId
());
extInfo
.
setThirdCensusCategoryName
(
product
.
getClassificationName
());
extInfo
.
setThirdCensusCategoryName
(
product
.
getClassificationName
());
}
}
if
(
CollectionUtils
.
isNotEmpty
(
product
.
getSpecialCodes
()))
{
extInfo
.
setSpecialCodes
(
product
.
getSpecialCodes
());
}
if
(
CollectionUtils
.
isNotEmpty
(
product
.
getSpecialAttrs
()))
{
if
(
CollectionUtils
.
isNotEmpty
(
product
.
getSpecialAttrs
()))
{
extInfo
.
setSpecialAttrs
(
product
.
getSpecialAttrs
());
extInfo
.
setSpecialAttrs
(
product
.
getSpecialAttrs
());
}
}
...
...
assortment-ordercenter-sdk/src/main/java/com/freemud/sdk/api/assortment/order/request/order/CreateOrderProductRequest.java
View file @
37088832
...
@@ -177,7 +177,5 @@ public class CreateOrderProductRequest extends BaseConfig {
...
@@ -177,7 +177,5 @@ public class CreateOrderProductRequest extends BaseConfig {
private
String
taxId
;
private
String
taxId
;
private
List
<
String
>
specialCodes
;
private
List
<
OrderSpecialExtraAttrRequest
>
specialAttrs
;
private
List
<
OrderSpecialExtraAttrRequest
>
specialAttrs
;
}
}
assortment-ordercenter-sdk/src/main/java/com/freemud/sdk/api/assortment/order/request/order/OrderProductAddInfoDto.java
View file @
37088832
...
@@ -71,7 +71,5 @@ public class OrderProductAddInfoDto extends BaseConfig {
...
@@ -71,7 +71,5 @@ public class OrderProductAddInfoDto extends BaseConfig {
private
String
taxId
;
private
String
taxId
;
private
List
<
String
>
specialCodes
;
private
List
<
OrderSpecialExtraAttrRequest
>
specialAttrs
;
private
List
<
OrderSpecialExtraAttrRequest
>
specialAttrs
;
}
}
assortment-ordercenter-sdk/src/main/java/com/freemud/sdk/api/assortment/order/request/order/OrderSpecialExtraAttrRequest.java
View file @
37088832
...
@@ -11,6 +11,10 @@ import java.util.List;
...
@@ -11,6 +11,10 @@ import java.util.List;
@NoArgsConstructor
@NoArgsConstructor
public
class
OrderSpecialExtraAttrRequest
{
public
class
OrderSpecialExtraAttrRequest
{
/**
/**
* 属性id
*/
private
String
attributeId
;
/**
* 属性名
* 属性名
*/
*/
private
String
attributeName
;
private
String
attributeName
;
...
...
order-application-service/src/main/java/cn/freemud/adapter/DeliveryAdapter.java
View file @
37088832
...
@@ -18,6 +18,7 @@ import com.freemud.sdk.api.assortment.order.enums.QueryOrderAccountType;
...
@@ -18,6 +18,7 @@ import com.freemud.sdk.api.assortment.order.enums.QueryOrderAccountType;
import
com.freemud.sdk.api.assortment.order.request.order.CreateOrderProductRequest
;
import
com.freemud.sdk.api.assortment.order.request.order.CreateOrderProductRequest
;
import
com.freemud.sdk.api.assortment.order.request.order.OrderProductAddInfoDto
;
import
com.freemud.sdk.api.assortment.order.request.order.OrderProductAddInfoDto
;
import
com.freemud.sdk.api.assortment.order.request.order.OrderSpecialExtraAttrRequest
;
import
com.freemud.sdk.api.assortment.order.request.order.OrderSpecialExtraAttrRequest
;
import
com.freemud.sdk.api.assortment.order.response.order.QueryOrdersResponse
;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.apache.commons.lang.StringUtils
;
import
org.apache.commons.lang.StringUtils
;
import
org.springframework.stereotype.Component
;
import
org.springframework.stereotype.Component
;
...
@@ -191,14 +192,20 @@ public class DeliveryAdapter {
...
@@ -191,14 +192,20 @@ public class DeliveryAdapter {
String
attr
=
""
;
String
attr
=
""
;
for
(
OrderSpecialExtraAttrRequest
special
:
extInfo
.
getSpecialAttrs
())
{
for
(
OrderSpecialExtraAttrRequest
special
:
extInfo
.
getSpecialAttrs
())
{
if
(
special
.
getAttributeName
().
indexOf
(
"冰"
)
>=
0
)
{
if
(
special
.
getAttributeName
().
indexOf
(
"冰"
)
>=
0
)
{
attr
+=
special
.
getAttributeName
()+
","
;
attr
=
special
.
getAttributeName
();
break
;
}
}
}
}
if
(
attr
.
length
()
>
0
)
{
if
(
attr
.
length
()
>
0
)
{
attr
=
attr
.
substring
(
0
,
attr
.
length
()-
1
);
productName
+=
"("
+
attr
+
")"
;
productName
+=
"("
+
attr
+
")"
;
}
}
}
}
if
(
CollectionUtils
.
isNotEmpty
(
productList
.
getMaterialProduct
()))
{
for
(
QueryOrdersResponseDto
.
DataBean
.
OrderBean
.
ProductBean
material
:
productList
.
getMaterialProduct
())
{
productName
+=
"/"
+
material
.
getSpecificationName
();
}
}
deliveryProductInfo
.
setProductName
(
productName
);
deliveryProductInfo
.
setProductName
(
productName
);
deliveryProductInfo
.
setProductNumber
(
productList
.
getNumber
());
deliveryProductInfo
.
setProductNumber
(
productList
.
getNumber
());
deliveryProductInfo
.
setProductPrice
(
productList
.
getSalePrice
().
intValue
());
deliveryProductInfo
.
setProductPrice
(
productList
.
getSalePrice
().
intValue
());
...
@@ -221,14 +228,20 @@ public class DeliveryAdapter {
...
@@ -221,14 +228,20 @@ public class DeliveryAdapter {
String
attr
=
""
;
String
attr
=
""
;
for
(
OrderSpecialExtraAttrRequest
special
:
extInfoCombo
.
getSpecialAttrs
())
{
for
(
OrderSpecialExtraAttrRequest
special
:
extInfoCombo
.
getSpecialAttrs
())
{
if
(
special
.
getAttributeName
().
indexOf
(
"冰"
)
>=
0
)
{
if
(
special
.
getAttributeName
().
indexOf
(
"冰"
)
>=
0
)
{
attr
+=
special
.
getAttributeName
()+
","
;
attr
=
special
.
getAttributeName
();
break
;
}
}
}
}
if
(
attr
.
length
()
>
0
)
{
if
(
attr
.
length
()
>
0
)
{
attr
=
attr
.
substring
(
0
,
attr
.
length
()-
1
);
productNameCombo
+=
"("
+
attr
+
")"
;
productNameCombo
+=
"("
+
attr
+
")"
;
}
}
}
}
if
(
CollectionUtils
.
isNotEmpty
(
comboProduct
.
getMaterialProduct
()))
{
for
(
QueryOrdersResponseDto
.
DataBean
.
OrderBean
.
ProductBean
material
:
comboProduct
.
getMaterialProduct
())
{
productNameCombo
+=
"/"
+
material
.
getSpecificationName
();
}
}
deliveryComboProductInfo
.
setProductName
(
productNameCombo
);
deliveryComboProductInfo
.
setProductName
(
productNameCombo
);
deliveryComboProductInfo
.
setProductNumber
(
comboProduct
.
getNumber
()/
productList
.
getNumber
());
deliveryComboProductInfo
.
setProductNumber
(
comboProduct
.
getNumber
()/
productList
.
getNumber
());
deliveryComboProductInfo
.
setProductPrice
(
comboProduct
.
getSalePrice
().
intValue
());
deliveryComboProductInfo
.
setProductPrice
(
comboProduct
.
getSalePrice
().
intValue
());
...
@@ -241,12 +254,35 @@ public class DeliveryAdapter {
...
@@ -241,12 +254,35 @@ public class DeliveryAdapter {
deliveryComboProductInfo
.
setParentCode
(
Long
.
valueOf
(
comboProduct
.
getParentProductId
().
replace
(
"_"
,
""
)));
deliveryComboProductInfo
.
setParentCode
(
Long
.
valueOf
(
comboProduct
.
getParentProductId
().
replace
(
"_"
,
""
)));
deliveryProductInfo
.
setProductCode
(
deliveryComboProductInfo
.
getParentCode
()+
""
);
deliveryProductInfo
.
setProductCode
(
deliveryComboProductInfo
.
getParentCode
()+
""
);
if
(
CollectionUtils
.
isNotEmpty
(
comboProduct
.
getMaterialProduct
()))
{
comboProduct
.
getMaterialProduct
().
forEach
(
o
->
{
deliveryComboProductInfo
.
setProductPrice
(
deliveryComboProductInfo
.
getProductPrice
()
+
o
.
getSalePrice
().
intValue
());
//餐道使用
deliveryComboProductInfo
.
setCumulatedTotal
(
deliveryComboProductInfo
.
getCumulatedTotal
()
+
comboProduct
.
getNumber
()
*
o
.
getSalePrice
().
intValue
());
deliveryProductInfo
.
setProductPrice
(
deliveryProductInfo
.
getProductPrice
()
+
o
.
getSalePrice
().
intValue
());
//餐道使用
deliveryProductInfo
.
setCumulatedTotal
(
deliveryProductInfo
.
getCumulatedTotal
()
+
comboProduct
.
getNumber
()
*
o
.
getSalePrice
().
intValue
());
});
}
productInfos
.
add
(
deliveryComboProductInfo
);
productInfos
.
add
(
deliveryComboProductInfo
);
});
});
}
}
if
(
CollectionUtils
.
isNotEmpty
(
productList
.
getMaterialProduct
()))
{
productList
.
getMaterialProduct
().
forEach
(
o
->
{
deliveryProductInfo
.
setProductPrice
(
deliveryProductInfo
.
getProductPrice
()
+
o
.
getSalePrice
().
intValue
());
//餐道使用
deliveryProductInfo
.
setCumulatedTotal
(
deliveryProductInfo
.
getCumulatedTotal
()
+
productList
.
getNumber
()
*
o
.
getSalePrice
().
intValue
());
});
}
});
});
deliveryOrderRequestDto
.
setProductTotal
(
productInfos
.
stream
().
mapToInt
(
t
->
t
.
getCumulatedTotal
()).
sum
());
deliveryOrderRequestDto
.
setProductTotal
(
productInfos
.
stream
().
mapToInt
(
t
->
t
.
getCumulatedTotal
()).
sum
());
}
}
deliveryOrderRequestDto
.
setProductInfos
(
productInfos
);
deliveryOrderRequestDto
.
setProductInfos
(
productInfos
);
deliveryOrderRequestDto
.
setOrderSource
(
OrderSourceType
.
ALIPAY
.
getCode
().
equals
(
order
.
getSource
())?
"Alipay"
:
"freemud"
);
deliveryOrderRequestDto
.
setOrderSource
(
OrderSourceType
.
ALIPAY
.
getCode
().
equals
(
order
.
getSource
())?
"Alipay"
:
"freemud"
);
if
(
CollectionUtils
.
isNotEmpty
(
order
.
getAccountList
()))
{
if
(
CollectionUtils
.
isNotEmpty
(
order
.
getAccountList
()))
{
...
...
order-application-service/src/main/java/cn/freemud/adapter/OrderAdapter.java
View file @
37088832
...
@@ -1857,11 +1857,13 @@ public class OrderAdapter {
...
@@ -1857,11 +1857,13 @@ public class OrderAdapter {
List
<
ProductVo
>
setMaterialProducts
=
new
ArrayList
<>();
List
<
ProductVo
>
setMaterialProducts
=
new
ArrayList
<>();
product
.
getMaterialProduct
().
forEach
(
materialProduct
->
{
product
.
getMaterialProduct
().
forEach
(
materialProduct
->
{
ProductVo
material
=
convent2ProductVo
(
materialProduct
);
ProductVo
material
=
convent2ProductVo
(
materialProduct
);
material
.
setOriginalTotalAmount
(
new
BigDecimal
(
material
.
getOriginalPrice
()).
multiply
(
new
BigDecimal
(
productVo
.
getQty
())).
longValue
());
material
.
setSaleTotalAmount
(
new
BigDecimal
(
material
.
getFinalPrice
()).
multiply
(
new
BigDecimal
(
productVo
.
getQty
())).
longValue
());
setMaterialProducts
.
add
(
material
);
setMaterialProducts
.
add
(
material
);
productVo
.
setOriginalPrice
(
new
BigDecimal
(
productVo
.
getOriginalPrice
()).
subtract
(
new
BigDecimal
(
material
.
getOriginalPrice
())).
longValue
());
productVo
.
setOriginalPrice
(
new
BigDecimal
(
productVo
.
getOriginalPrice
()).
add
(
new
BigDecimal
(
material
.
getOriginalPrice
())).
longValue
());
productVo
.
setFinalPrice
(
new
BigDecimal
(
productVo
.
getFinalPrice
()).
subtract
(
new
BigDecimal
(
material
.
getFinalPrice
())).
longValue
());
productVo
.
setFinalPrice
(
new
BigDecimal
(
productVo
.
getFinalPrice
()).
add
(
new
BigDecimal
(
material
.
getFinalPrice
())).
longValue
());
productVo
.
setOriginalTotalAmount
(
new
BigDecimal
(
productVo
.
getOriginalTotalAmount
()).
subtract
(
new
BigDecimal
(
material
.
getOriginalTotalAmount
())).
longValue
());
productVo
.
setOriginalTotalAmount
(
new
BigDecimal
(
productVo
.
getOriginalTotalAmount
()).
add
(
new
BigDecimal
(
material
.
getOriginalTotalAmount
())).
longValue
());
productVo
.
setSaleTotalAmount
(
new
BigDecimal
(
productVo
.
getSaleTotalAmount
()).
subtract
(
new
BigDecimal
(
product
.
getSettlementPrice
())).
longValue
());
productVo
.
setSaleTotalAmount
(
new
BigDecimal
(
productVo
.
getSaleTotalAmount
()).
add
(
new
BigDecimal
(
material
.
getSaleTotalAmount
())).
longValue
());
});
});
comboProduct
.
setSetMaterialProducts
(
setMaterialProducts
);
comboProduct
.
setSetMaterialProducts
(
setMaterialProducts
);
}
}
...
@@ -1873,11 +1875,13 @@ public class OrderAdapter {
...
@@ -1873,11 +1875,13 @@ public class OrderAdapter {
List
<
ProductVo
>
setMaterialProducts
=
new
ArrayList
<>();
List
<
ProductVo
>
setMaterialProducts
=
new
ArrayList
<>();
productBean
.
getMaterialProduct
().
forEach
(
product
->
{
productBean
.
getMaterialProduct
().
forEach
(
product
->
{
ProductVo
material
=
convent2ProductVo
(
product
);
ProductVo
material
=
convent2ProductVo
(
product
);
material
.
setOriginalTotalAmount
(
new
BigDecimal
(
material
.
getOriginalPrice
()).
multiply
(
new
BigDecimal
(
productVo
.
getQty
())).
longValue
());
material
.
setSaleTotalAmount
(
new
BigDecimal
(
material
.
getFinalPrice
()).
multiply
(
new
BigDecimal
(
productVo
.
getQty
())).
longValue
());
setMaterialProducts
.
add
(
material
);
setMaterialProducts
.
add
(
material
);
productVo
.
setOriginalPrice
(
new
BigDecimal
(
productVo
.
getOriginalPrice
()).
subtract
(
new
BigDecimal
(
material
.
getOriginalPrice
())).
longValue
());
productVo
.
setOriginalPrice
(
new
BigDecimal
(
productVo
.
getOriginalPrice
()).
add
(
new
BigDecimal
(
material
.
getOriginalPrice
())).
longValue
());
productVo
.
setFinalPrice
(
new
BigDecimal
(
productVo
.
getFinalPrice
()).
subtract
(
new
BigDecimal
(
material
.
getFinalPrice
())).
longValue
());
productVo
.
setFinalPrice
(
new
BigDecimal
(
productVo
.
getFinalPrice
()).
add
(
new
BigDecimal
(
material
.
getFinalPrice
())).
longValue
());
productVo
.
setOriginalTotalAmount
(
new
BigDecimal
(
productVo
.
getOriginalTotalAmount
()).
subtract
(
new
BigDecimal
(
material
.
getOriginalTotalAmount
())).
longValue
());
productVo
.
setOriginalTotalAmount
(
new
BigDecimal
(
productVo
.
getOriginalTotalAmount
()).
add
(
new
BigDecimal
(
material
.
getOriginalTotalAmount
())).
longValue
());
productVo
.
setSaleTotalAmount
(
new
BigDecimal
(
productVo
.
getSaleTotalAmount
()).
subtract
(
new
BigDecimal
(
product
.
getSettlementPrice
())).
longValue
());
productVo
.
setSaleTotalAmount
(
new
BigDecimal
(
productVo
.
getSaleTotalAmount
()).
add
(
new
BigDecimal
(
material
.
getSaleTotalAmount
())).
longValue
());
});
});
productVo
.
setSetMaterialProducts
(
setMaterialProducts
);
productVo
.
setSetMaterialProducts
(
setMaterialProducts
);
}
}
...
@@ -1899,15 +1903,21 @@ public class OrderAdapter {
...
@@ -1899,15 +1903,21 @@ public class OrderAdapter {
String
attr
=
""
;
String
attr
=
""
;
for
(
OrderSpecialExtraAttrRequest
special
:
extInfo
.
getSpecialAttrs
())
{
for
(
OrderSpecialExtraAttrRequest
special
:
extInfo
.
getSpecialAttrs
())
{
if
(
special
.
getAttributeName
().
indexOf
(
"冰"
)
>=
0
)
{
if
(
special
.
getAttributeName
().
indexOf
(
"冰"
)
>=
0
)
{
attr
+=
special
.
getAttributeName
()+
","
;
attr
=
special
.
getAttributeName
();
break
;
}
}
}
}
if
(
attr
.
length
()
>
0
)
{
if
(
attr
.
length
()
>
0
)
{
attr
=
attr
.
substring
(
0
,
attr
.
length
()-
1
);
productName
+=
"("
+
attr
+
")"
;
productName
+=
"("
+
attr
+
")"
;
}
}
}
}
if
(
CollectionUtils
.
isNotEmpty
(
productBean
.
getMaterialProduct
()))
{
for
(
QueryOrdersResponse
.
DataBean
.
OrderBean
.
ProductBean
material
:
productBean
.
getMaterialProduct
())
{
productName
+=
"/"
+
material
.
getSpecificationName
();
}
}
productVo
.
setName
(
productName
);
productVo
.
setName
(
productName
);
productVo
.
setSpuName
(
productBean
.
getProductName
());
productVo
.
setSpuName
(
productBean
.
getProductName
());
productVo
.
setPicture
(
productBean
.
getPicture
());
productVo
.
setPicture
(
productBean
.
getPicture
());
...
@@ -2211,16 +2221,17 @@ public class OrderAdapter {
...
@@ -2211,16 +2221,17 @@ public class OrderAdapter {
}
}
});
});
createOrderProductDemoDto
.
setComboProduct
(
comboProducts
);
createOrderProductDemoDto
.
setComboProduct
(
comboProducts
);
}
else
if
(
CollectionUtils
.
isNotEmpty
(
cartGoodsDetailDto
.
getMaterialList
()))
{
//加料商品
createOrderProductDemoDto
.
setProductType
(
ProductType
.
MATERIALPRODUCT_UPPRICE
.
getCode
());
List
<
CreateOrderProductRequest
>
materialProducts
=
new
ArrayList
<>();
cartGoodsDetailDto
.
getMaterialList
().
forEach
(
product
->
{
materialProducts
.
add
(
convent2MCCafeOrderProductDemo
(
product
,
ProductType
.
LITTLE_MATERIAL_PRODUCT
.
getCode
()));
});
createOrderProductDemoDto
.
setMaterialProduct
(
materialProducts
);
}
}
}
}
if
(
CollectionUtils
.
isNotEmpty
(
cartGoodsDetailDto
.
getMaterialList
()))
{
//加料商品
createOrderProductDemoDto
.
setProductType
(
ProductType
.
MATERIALPRODUCT_UPPRICE
.
getCode
());
List
<
CreateOrderProductRequest
>
materialProducts
=
new
ArrayList
<>();
cartGoodsDetailDto
.
getMaterialList
().
forEach
(
product
->
{
materialProducts
.
add
(
convent2MCCafeOrderProductDemo
(
product
,
ProductType
.
LITTLE_MATERIAL_PRODUCT
.
getCode
()));
});
createOrderProductDemoDto
.
setMaterialProduct
(
materialProducts
);
}
return
createOrderProductDemoDto
;
return
createOrderProductDemoDto
;
}
}
...
@@ -2312,12 +2323,9 @@ public class OrderAdapter {
...
@@ -2312,12 +2323,9 @@ public class OrderAdapter {
createOrderProductDemoDto
.
setClassificationId
(
cartGoodsDetailDto
.
getClassificationId
());
createOrderProductDemoDto
.
setClassificationId
(
cartGoodsDetailDto
.
getClassificationId
());
createOrderProductDemoDto
.
setClassificationName
(
cartGoodsDetailDto
.
getClassificationName
());
createOrderProductDemoDto
.
setClassificationName
(
cartGoodsDetailDto
.
getClassificationName
());
if
(
CollectionUtils
.
isNotEmpty
(
cartGoodsDetailDto
.
getSpecialExtra
()))
{
if
(
CollectionUtils
.
isNotEmpty
(
cartGoodsDetailDto
.
getSpecialExtra
()))
{
// createOrderProductDemoDto.setSpecialCodes(cartGoodsDetailDto.getSpecialExtra().stream().map(ShoppingCartGoodsDto.CartGoodsDetailDto.CartGoodsExtra::getSpecialCode).collect(Collectors.toList()));
createOrderProductDemoDto
.
setSpecialAttrs
(
new
ArrayList
<>());
createOrderProductDemoDto
.
setSpecialAttrs
(
new
ArrayList
<>());
createOrderProductDemoDto
.
setSpecialCodes
(
new
ArrayList
<>());
cartGoodsDetailDto
.
getSpecialExtra
().
stream
().
forEach
(
o
->
{
cartGoodsDetailDto
.
getSpecialExtra
().
stream
().
forEach
(
o
->
{
createOrderProductDemoDto
.
getSpecialAttrs
().
add
(
new
OrderSpecialExtraAttrRequest
(
o
.
getAttributeName
(),
o
.
getSpecialCode
()));
createOrderProductDemoDto
.
getSpecialAttrs
().
add
(
new
OrderSpecialExtraAttrRequest
(
o
.
getAttributeId
(),
o
.
getAttributeName
(),
o
.
getSpecialCode
()));
createOrderProductDemoDto
.
getSpecialCodes
().
add
(
o
.
getSpecialCode
());
});
});
}
}
return
createOrderProductDemoDto
;
return
createOrderProductDemoDto
;
...
...
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