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
7d9d76bc
Commit
7d9d76bc
authored
Oct 28, 2020
by
徐康
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature/20200915_麦咖啡p2v3活动入机增加TENDERID字段' into develop
parents
a6a71cda
125b619c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
12 deletions
+28
-12
assortment-ordercenter-sdk/src/main/java/com/freemud/sdk/api/assortment/order/adapter/OrderSdkAdapter.java
+2
-0
order-application-service/src/main/java/cn/freemud/adapter/DeliveryAdapter.java
+17
-4
order-application-service/src/main/java/cn/freemud/adapter/OrderAdapter.java
+9
-8
No files found.
assortment-ordercenter-sdk/src/main/java/com/freemud/sdk/api/assortment/order/adapter/OrderSdkAdapter.java
View file @
7d9d76bc
...
...
@@ -1924,6 +1924,8 @@ public class OrderSdkAdapter {
newOrderAccountType
=
OldOrderAccountType
.
TOTAL_DISCOUNT
.
getCode
();
case
220
:
newOrderAccountType
=
OldOrderAccountType
.
MEMBER_PRICE_DISCOUNT
.
getCode
();
case
99
:
newOrderAccountType
=
OldOrderAccountType
.
FREIGHT_COUPON
.
getCode
();
default
:
break
;
}
...
...
order-application-service/src/main/java/cn/freemud/adapter/DeliveryAdapter.java
View file @
7d9d76bc
...
...
@@ -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.OrderProductAddInfoDto
;
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.lang.StringUtils
;
import
org.springframework.stereotype.Component
;
...
...
@@ -191,14 +192,20 @@ public class DeliveryAdapter {
String
attr
=
""
;
for
(
OrderSpecialExtraAttrRequest
special
:
extInfo
.
getSpecialAttrs
())
{
if
(
special
.
getAttributeName
().
indexOf
(
"冰"
)
>=
0
)
{
attr
+=
special
.
getAttributeName
()+
","
;
attr
=
special
.
getAttributeName
();
break
;
}
}
if
(
attr
.
length
()
>
0
)
{
attr
=
attr
.
substring
(
0
,
attr
.
length
()-
1
);
productName
+=
"("
+
attr
+
")"
;
}
}
if
(
CollectionUtils
.
isNotEmpty
(
productList
.
getMaterialProduct
()))
{
for
(
QueryOrdersResponseDto
.
DataBean
.
OrderBean
.
ProductBean
material
:
productList
.
getMaterialProduct
())
{
productName
+=
"/"
+
material
.
getSpecificationName
();
}
}
deliveryProductInfo
.
setProductName
(
productName
);
deliveryProductInfo
.
setProductNumber
(
productList
.
getNumber
());
deliveryProductInfo
.
setProductPrice
(
productList
.
getSalePrice
().
intValue
());
...
...
@@ -221,14 +228,20 @@ public class DeliveryAdapter {
String
attr
=
""
;
for
(
OrderSpecialExtraAttrRequest
special
:
extInfoCombo
.
getSpecialAttrs
())
{
if
(
special
.
getAttributeName
().
indexOf
(
"冰"
)
>=
0
)
{
attr
+=
special
.
getAttributeName
()+
","
;
attr
=
special
.
getAttributeName
();
break
;
}
}
if
(
attr
.
length
()
>
0
)
{
attr
=
attr
.
substring
(
0
,
attr
.
length
()-
1
);
productNameCombo
+=
"("
+
attr
+
")"
;
}
}
if
(
CollectionUtils
.
isNotEmpty
(
comboProduct
.
getMaterialProduct
()))
{
for
(
QueryOrdersResponseDto
.
DataBean
.
OrderBean
.
ProductBean
material
:
comboProduct
.
getMaterialProduct
())
{
productNameCombo
+=
"/"
+
material
.
getSpecificationName
();
}
}
deliveryComboProductInfo
.
setProductName
(
productNameCombo
);
deliveryComboProductInfo
.
setProductNumber
(
comboProduct
.
getNumber
()/
productList
.
getNumber
());
deliveryComboProductInfo
.
setProductPrice
(
comboProduct
.
getSalePrice
().
intValue
());
...
...
order-application-service/src/main/java/cn/freemud/adapter/OrderAdapter.java
View file @
7d9d76bc
...
...
@@ -2302,16 +2302,17 @@ public class OrderAdapter {
}
});
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
;
}
...
...
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