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
8eb4085f
Commit
8eb4085f
authored
Oct 29, 2020
by
yu.sun
Browse files
Options
Browse Files
Download
Plain Diff
sunyu::update::fix bug about specialAttribute copyOrder
parents
0aa176cf
13a1533f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
7 deletions
+9
-7
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/mcoffee/ShoppingCartMCoffeeServiceImpl.java
+9
-7
No files found.
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/mcoffee/ShoppingCartMCoffeeServiceImpl.java
View file @
8eb4085f
...
@@ -866,9 +866,9 @@ public class ShoppingCartMCoffeeServiceImpl {
...
@@ -866,9 +866,9 @@ public class ShoppingCartMCoffeeServiceImpl {
JSONArray
specialAttrs
=
JSONArray
.
parseArray
(
extJson
.
getString
(
"specialAttrs"
));
JSONArray
specialAttrs
=
JSONArray
.
parseArray
(
extJson
.
getString
(
"specialAttrs"
));
for
(
Object
specialAttr
:
specialAttrs
)
{
for
(
Object
specialAttr
:
specialAttrs
)
{
JSONObject
object
=
JSONObject
.
parseObject
(
specialAttr
.
toString
());
JSONObject
object
=
JSONObject
.
parseObject
(
specialAttr
.
toString
());
specialExtra
.
setAttributeId
(
extJson
.
containsKey
(
"attributeId"
)
?
extJson
.
getString
(
"attributeId"
)
:
""
);
specialExtra
.
setAttributeId
(
object
.
containsKey
(
"attributeId"
)
?
object
.
getString
(
"attributeId"
)
:
""
);
specialExtra
.
setAttributeName
(
extJson
.
containsKey
(
"attributeName"
)
?
extJson
.
getString
(
"attributeName"
)
:
""
);
specialExtra
.
setAttributeName
(
object
.
containsKey
(
"attributeName"
)
?
object
.
getString
(
"attributeName"
)
:
""
);
specialExtra
.
setAttributeId
(
extJson
.
containsKey
(
"specialCode"
)
?
extJson
.
getString
(
"specialCode"
)
:
""
);
specialExtra
.
setAttributeId
(
object
.
containsKey
(
"specialCode"
)
?
object
.
getString
(
"specialCode"
)
:
""
);
}
}
cartGoods
.
setSpecialExtra
(
Arrays
.
asList
(
specialExtra
));
cartGoods
.
setSpecialExtra
(
Arrays
.
asList
(
specialExtra
));
}
}
...
@@ -896,6 +896,7 @@ public class ShoppingCartMCoffeeServiceImpl {
...
@@ -896,6 +896,7 @@ public class ShoppingCartMCoffeeServiceImpl {
comboxGoods
.
setOriginalPrice
(
orderItemResp
.
getProductPrice
().
longValue
());
comboxGoods
.
setOriginalPrice
(
orderItemResp
.
getProductPrice
().
longValue
());
comboxGoods
.
setFinalPrice
(
orderItemResp
.
getSalePrice
().
longValue
());
comboxGoods
.
setFinalPrice
(
orderItemResp
.
getSalePrice
().
longValue
());
comboxGoods
.
setPic
(
orderItemResp
.
getProductPicUrl
());
comboxGoods
.
setPic
(
orderItemResp
.
getProductPicUrl
());
comboxGoods
.
setName
(
StringUtils
.
isNotEmpty
(
orderItemResp
.
getProductName
())
?
orderItemResp
.
getProductName
()
:
""
);
comboxGoods
.
setName
(
StringUtils
.
isNotEmpty
(
orderItemResp
.
getProductName
())
?
orderItemResp
.
getProductName
()
:
""
);
comboxGoods
.
setSpuName
(
StringUtils
.
isNotEmpty
(
orderItemResp
.
getProductName
())
?
orderItemResp
.
getProductName
()
:
""
);
comboxGoods
.
setSpuName
(
StringUtils
.
isNotEmpty
(
orderItemResp
.
getProductName
())
?
orderItemResp
.
getProductName
()
:
""
);
comboxGoods
.
setSkuName
(
StringUtils
.
isNotEmpty
(
orderItemResp
.
getProductSpecName
())
?
orderItemResp
.
getProductSpecName
()
:
""
);
comboxGoods
.
setSkuName
(
StringUtils
.
isNotEmpty
(
orderItemResp
.
getProductSpecName
())
?
orderItemResp
.
getProductSpecName
()
:
""
);
...
@@ -912,6 +913,7 @@ public class ShoppingCartMCoffeeServiceImpl {
...
@@ -912,6 +913,7 @@ public class ShoppingCartMCoffeeServiceImpl {
}
}
comboxGoods
.
setExtra
(
extra
);
comboxGoods
.
setExtra
(
extra
);
}
}
for
(
OrderItemResp
itemResp
:
orderItemList
)
{
for
(
OrderItemResp
itemResp
:
orderItemList
)
{
//特制
//特制
if
(
StringUtils
.
isNotEmpty
(
itemResp
.
getExtInfo
())){
if
(
StringUtils
.
isNotEmpty
(
itemResp
.
getExtInfo
())){
...
@@ -921,11 +923,11 @@ public class ShoppingCartMCoffeeServiceImpl {
...
@@ -921,11 +923,11 @@ public class ShoppingCartMCoffeeServiceImpl {
JSONArray
specialAttrs
=
JSONArray
.
parseArray
(
extJson
.
getString
(
"specialAttrs"
));
JSONArray
specialAttrs
=
JSONArray
.
parseArray
(
extJson
.
getString
(
"specialAttrs"
));
for
(
Object
specialAttr
:
specialAttrs
)
{
for
(
Object
specialAttr
:
specialAttrs
)
{
JSONObject
object
=
JSONObject
.
parseObject
(
specialAttr
.
toString
());
JSONObject
object
=
JSONObject
.
parseObject
(
specialAttr
.
toString
());
specialExtra
.
setAttributeId
(
extJson
.
containsKey
(
"attributeId"
)
?
extJson
.
getString
(
"attributeId"
)
:
""
);
specialExtra
.
setAttributeId
(
object
.
containsKey
(
"attributeId"
)
?
object
.
getString
(
"attributeId"
)
:
""
);
specialExtra
.
setAttributeName
(
extJson
.
containsKey
(
"attributeName"
)
?
extJson
.
getString
(
"attributeName"
)
:
""
);
specialExtra
.
setAttributeName
(
object
.
containsKey
(
"attributeName"
)
?
object
.
getString
(
"attributeName"
)
:
""
);
specialExtra
.
setAttributeId
(
extJson
.
containsKey
(
"specialCode"
)
?
extJson
.
getString
(
"specialCode"
)
:
""
);
specialExtra
.
setAttributeId
(
object
.
containsKey
(
"specialCode"
)
?
object
.
getString
(
"specialCode"
)
:
""
);
}
}
c
art
Goods
.
setSpecialExtra
(
Arrays
.
asList
(
specialExtra
));
c
ombox
Goods
.
setSpecialExtra
(
Arrays
.
asList
(
specialExtra
));
}
}
}
}
}
}
...
...
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