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
6222ab48
Commit
6222ab48
authored
Aug 14, 2020
by
徐康
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
创建配送单测试
parent
9adb3d46
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
51 deletions
+4
-51
order-application-service/src/main/java/cn/freemud/service/impl/MCCafeOrderServiceImpl.java
+4
-51
No files found.
order-application-service/src/main/java/cn/freemud/service/impl/MCCafeOrderServiceImpl.java
View file @
6222ab48
...
...
@@ -386,57 +386,6 @@ public class MCCafeOrderServiceImpl implements MCCafeOrderService {
}
}
/**
* 获取父子订单商品第三方商品编号
*
* @param
* @return
*/
private
CreateFatherSonOrderRequest
getProductCustomerCodeNew
(
CreateFatherSonOrderRequest
fatherSonOrderRequest
)
{
List
<
String
>
pids
=
new
ArrayList
<>();
List
<
CreateFatherSonOrderRequest
.
OrderInfo
>
productOrderInfoList
=
fatherSonOrderRequest
.
getOrderInfoList
().
stream
().
filter
(
orderInfo
->
orderInfo
.
getProducts
()
!=
null
).
collect
(
Collectors
.
toList
());
if
(
CollectionUtils
.
isEmpty
(
productOrderInfoList
))
{
return
fatherSonOrderRequest
;
}
for
(
CreateOrderProductRequest
productDto
:
productOrderInfoList
.
get
(
0
).
getProducts
())
{
pids
.
add
(
productDto
.
getProductId
());
}
Map
<
String
,
GetProductsVo
>
products
=
itemService
.
getSpuProducts
(
pids
,
fatherSonOrderRequest
.
getPartnerId
(),
productOrderInfoList
.
get
(
0
).
getShopId
(),
fatherSonOrderRequest
.
getMenuType
());
if
(
products
.
isEmpty
())
{
return
fatherSonOrderRequest
;
}
for
(
CreateOrderProductRequest
productDto
:
productOrderInfoList
.
get
(
0
).
getProducts
())
{
if
(
StringUtils
.
isNotEmpty
(
productDto
.
getSpecification
())
&&
products
.
get
(
productDto
.
getSpecification
())
!=
null
)
{
productDto
.
setCustomerCode
(
products
.
get
(
productDto
.
getSpecification
()).
getCustomerCode
());
productDto
.
setProductCode
(
products
.
get
(
productDto
.
getSpecification
()).
getProductCode
());
productDto
.
setThirdProductSpecId
(
products
.
get
(
productDto
.
getSpecification
()).
getThirdProductSpecId
());
productDto
.
setThirdProductPropertyId
(
getThirdPropertyId
(
products
.
get
(
productDto
.
getSpecification
()).
getProductAttributeGroupList
(),
productDto
.
getAddInfo
()));
}
else
{
productDto
.
setCustomerCode
(
""
);
productDto
.
setProductCode
(
""
);
LogUtil
.
error
(
"getProducts_exception"
,
JSONObject
.
toJSONString
(
pids
),
JSONObject
.
toJSONString
(
products
));
}
//套餐子商品
if
(
CollectionUtils
.
isNotEmpty
(
productDto
.
getComboProduct
())){
for
(
CreateOrderProductRequest
comboProduct
:
productDto
.
getComboProduct
()){
String
comboSkuId
=
comboProduct
.
getSpecification
();
if
(
products
.
get
(
comboSkuId
)
!=
null
)
{
comboProduct
.
setCustomerCode
(
products
.
get
(
comboSkuId
).
getCustomerCode
());
comboProduct
.
setProductCode
(
products
.
get
(
comboSkuId
).
getProductCode
());
comboProduct
.
setThirdProductSpecId
(
products
.
get
(
comboSkuId
).
getThirdProductSpecId
());
comboProduct
.
setThirdProductPropertyId
(
getThirdPropertyId
(
products
.
get
(
comboSkuId
).
getProductAttributeGroupList
(),
comboProduct
.
getAddInfo
()));
}
else
{
comboProduct
.
setCustomerCode
(
""
);
comboProduct
.
setProductCode
(
""
);
LogUtil
.
error
(
"getProducts_exception"
,
JSONObject
.
toJSONString
(
comboSkuId
),
JSONObject
.
toJSONString
(
products
),
null
);
}
}
}
}
return
fatherSonOrderRequest
;
}
/**
* 获取商品第三方商品编号
*
...
...
@@ -1000,6 +949,10 @@ public class MCCafeOrderServiceImpl implements MCCafeOrderService {
return
sendPaySuccessNoticeMessage
();
}
CreateDeliveryVo
createDeliveryVo
=
deliveryAdapter
.
buildDeliveryOrderRequestDto
(
orderBean
,
storeInfo
,
deliveryCallBackUrl
,
linkedHashMap
.
get
(
"downstreamThirdOrderCode"
));
createDeliveryVo
.
getProductInfos
().
get
(
0
).
setProductCode
(
"1000011"
);
createDeliveryVo
.
setStoreId
(
"1450026"
);
createDeliveryVo
.
setStoreCode
(
"1450026"
);
createDeliveryVo
.
setDisplayOrderId
(
createDeliveryVo
.
getDisplayOrderId
().
replace
(
"768-"
,
"1450026-"
));
//创建配送单
CreateDeliveryOrderResponseDto
deliveryResponse
=
deliveryFeiginClient
.
deliveryOrderAdd
(
createDeliveryVo
);
//创建配送单失败,更新订单为异常单
...
...
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