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
13ceaa17
Commit
13ceaa17
authored
Nov 25, 2020
by
徐康
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature/20201124_xukang_麦咖啡p3v3' into develop
parents
d94c0701
eca63bfc
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
18 deletions
+28
-18
order-application-service/src/main/java/cn/freemud/adapter/DeliveryAdapter.java
+16
-15
order-application-service/src/main/java/cn/freemud/entities/vo/ProductInfo.java
+5
-0
order-application-service/src/main/java/cn/freemud/service/impl/MCCafeOrderServiceImpl.java
+7
-3
No files found.
order-application-service/src/main/java/cn/freemud/adapter/DeliveryAdapter.java
View file @
13ceaa17
...
...
@@ -187,25 +187,25 @@ public class DeliveryAdapter {
ProductInfo
deliveryProductInfo
=
new
ProductInfo
();
deliveryProductInfo
.
setProductCode
(
productList
.
getProductId
().
substring
(
4
));
String
productName
=
StringUtils
.
isBlank
(
productList
.
getSpecificationName
())
?
productList
.
getProductName
()
:
productList
.
getSpecificationName
();
String
grilling
=
""
;
OrderProductAddInfoDto
extInfo
=
JSON
.
parseObject
(
productList
.
getExtInfo
(),
OrderProductAddInfoDto
.
class
);
if
(
CollectionUtils
.
isNotEmpty
(
extInfo
.
getSpecialAttrs
()))
{
String
attr
=
""
;
for
(
OrderSpecialExtraAttrRequest
special
:
extInfo
.
getSpecialAttrs
())
{
if
(
special
.
getAttributeName
().
indexOf
(
"冰"
)
>=
0
)
{
attr
=
special
.
getAttributeName
();
break
;
}
}
if
(
attr
.
length
()
>
0
)
{
productName
+=
"("
+
attr
+
")"
;
grilling
+=
special
.
getAttributeName
()
+
"/"
;
}
}
if
(
CollectionUtils
.
isNotEmpty
(
productList
.
getMaterialProduct
()))
{
for
(
QueryOrdersResponseDto
.
DataBean
.
OrderBean
.
ProductBean
material
:
productList
.
getMaterialProduct
())
{
productName
+=
"/"
+
material
.
getSpecificationName
();
grilling
+=
material
.
getSpecificationName
()
+
"/"
;
}
}
if
(
grilling
.
length
()
>
0
)
{
grilling
=
grilling
.
substring
(
0
,
grilling
.
length
()-
1
);
}
deliveryProductInfo
.
setGrilling
(
grilling
);
deliveryProductInfo
.
setProductName
(
productName
);
deliveryProductInfo
.
setProductNumber
(
productList
.
getNumber
());
deliveryProductInfo
.
setProductPrice
(
productList
.
getSalePrice
().
intValue
());
...
...
@@ -223,25 +223,26 @@ public class DeliveryAdapter {
ProductInfo
deliveryComboProductInfo
=
new
ProductInfo
();
deliveryComboProductInfo
.
setProductCode
(
comboProduct
.
getProductId
().
length
()>
4
?
comboProduct
.
getProductId
().
substring
(
4
):
comboProduct
.
getProductId
());
String
productNameCombo
=
StringUtils
.
isBlank
(
comboProduct
.
getSpecificationName
())
?
comboProduct
.
getProductName
()
:
comboProduct
.
getSpecificationName
();
String
grillingCombo
=
""
;
OrderProductAddInfoDto
extInfoCombo
=
JSON
.
parseObject
(
comboProduct
.
getExtInfo
(),
OrderProductAddInfoDto
.
class
);
if
(
CollectionUtils
.
isNotEmpty
(
extInfoCombo
.
getSpecialAttrs
()))
{
String
attr
=
""
;
for
(
OrderSpecialExtraAttrRequest
special
:
extInfoCombo
.
getSpecialAttrs
())
{
if
(
special
.
getAttributeName
().
indexOf
(
"冰"
)
>=
0
)
{
attr
=
special
.
getAttributeName
();
break
;
}
}
if
(
attr
.
length
()
>
0
)
{
productNameCombo
+=
"("
+
attr
+
")"
;
grillingCombo
+=
special
.
getAttributeName
()
+
"/"
;
}
}
if
(
CollectionUtils
.
isNotEmpty
(
comboProduct
.
getMaterialProduct
()))
{
for
(
QueryOrdersResponseDto
.
DataBean
.
OrderBean
.
ProductBean
material
:
comboProduct
.
getMaterialProduct
())
{
productNameCombo
+=
"/"
+
material
.
getSpecificationName
();
grillingCombo
+=
material
.
getSpecificationName
()
+
"/"
;
}
}
if
(
grillingCombo
.
length
()
>
0
)
{
grillingCombo
=
grillingCombo
.
substring
(
0
,
grillingCombo
.
length
()-
1
);
}
deliveryComboProductInfo
.
setGrilling
(
grillingCombo
);
deliveryComboProductInfo
.
setProductName
(
productNameCombo
);
deliveryComboProductInfo
.
setProductNumber
(
comboProduct
.
getNumber
()/
productList
.
getNumber
());
deliveryComboProductInfo
.
setProductPrice
(
comboProduct
.
getSalePrice
().
intValue
());
...
...
order-application-service/src/main/java/cn/freemud/entities/vo/ProductInfo.java
View file @
13ceaa17
...
...
@@ -40,6 +40,11 @@ public class ProductInfo {
private
String
productName
;
/**
* 特挑和加料信息
*/
private
String
grilling
;
/**
* 商品数量
* productNumber不能为空
* productNumber不能小于1
...
...
order-application-service/src/main/java/cn/freemud/service/impl/MCCafeOrderServiceImpl.java
View file @
13ceaa17
...
...
@@ -988,7 +988,11 @@ public class MCCafeOrderServiceImpl implements MCCafeOrderService {
if
(
deliveryResponse
==
null
||
RESPONSE_SUCCESS_CODE
!=
deliveryResponse
.
getCode
()
||
deliveryResponse
.
getData
()
==
null
)
{
String
deliveryId
=
deliveryResponse
!=
null
&&
deliveryResponse
.
getData
()
!=
null
?
deliveryResponse
.
getData
().
getDeliveryId
()
:
""
;
String
operator
=
"系统"
;
updateDeliveryAbnormal
(
orderBean
.
getCompanyId
(),
orderBean
.
getOid
(),
deliveryId
,
operator
);
String
abnormalDesc
=
"配送异常"
;
if
(
StringUtils
.
isNotBlank
(
deliveryResponse
.
getMsg
()))
{
abnormalDesc
=
deliveryResponse
.
getMsg
();
}
updateDeliveryAbnormal
(
orderBean
.
getCompanyId
(),
orderBean
.
getOid
(),
deliveryId
,
operator
,
abnormalDesc
);
emailAlertService
.
sendEmailAlert
(
"创建配送单失败"
,
String
.
format
(
"request:%s \r\nresponse:%s"
,
JSONObject
.
toJSONString
(
createDeliveryVo
),
JSONObject
.
toJSONString
(
deliveryResponse
)));
return
sendPaySuccessNoticeMessage
();
}
else
{
...
...
@@ -1008,9 +1012,9 @@ public class MCCafeOrderServiceImpl implements MCCafeOrderService {
* @param orderCode
* @param deliveryId
*/
public
void
updateDeliveryAbnormal
(
String
partnerId
,
String
orderCode
,
String
deliveryId
,
String
operator
)
{
public
void
updateDeliveryAbnormal
(
String
partnerId
,
String
orderCode
,
String
deliveryId
,
String
operator
,
String
abnormalDesc
)
{
AssortmentUpdateDeliveryAbnormalRequest
request
=
AssortmentUpdateDeliveryAbnormalRequest
.
builder
()
.
abnormalDesc
(
"配送异常"
)
.
abnormalDesc
(
abnormalDesc
)
.
deliveryId
(
deliveryId
)
.
orderCode
(
orderCode
)
.
partnerId
(
partnerId
)
...
...
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