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
125b619c
Commit
125b619c
authored
Oct 28, 2020
by
徐康
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
啡常月享卡
parent
16dfad36
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
4 deletions
+17
-4
order-application-service/src/main/java/cn/freemud/adapter/DeliveryAdapter.java
+17
-4
No files found.
order-application-service/src/main/java/cn/freemud/adapter/DeliveryAdapter.java
View file @
125b619c
...
@@ -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
;
...
@@ -185,14 +186,20 @@ public class DeliveryAdapter {
...
@@ -185,14 +186,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
.
getPrice
().
intValue
());
deliveryProductInfo
.
setProductPrice
(
productList
.
getPrice
().
intValue
());
...
@@ -215,14 +222,20 @@ public class DeliveryAdapter {
...
@@ -215,14 +222,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
.
getPrice
().
intValue
());
deliveryComboProductInfo
.
setProductPrice
(
comboProduct
.
getPrice
().
intValue
());
...
...
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