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
fd61cca6
Commit
fd61cca6
authored
May 18, 2020
by
xiaoer.li
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'remotes/origin/feature/1.9.22_C端订单状态描述'
parents
191c259c
a98771cd
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
99 additions
and
8 deletions
+99
-8
order-application-service/src/main/java/cn/freemud/adapter/OrderAdapter.java
+35
-6
order-application-service/src/main/java/cn/freemud/entities/dto/OrderViewStatusDto.java
+4
-2
order-application-service/src/main/java/cn/freemud/entities/vo/QueryOrderResponseVo.java
+4
-0
order-application-service/src/main/java/cn/freemud/enums/OrderTypeGather.java
+56
-0
No files found.
order-application-service/src/main/java/cn/freemud/adapter/OrderAdapter.java
View file @
fd61cca6
...
@@ -915,6 +915,21 @@ public class OrderAdapter {
...
@@ -915,6 +915,21 @@ public class OrderAdapter {
}
}
}
}
responseVo
.
setOrderCreateTime
(
yyyyMMddHHmmss
.
format
(
new
Date
(
ordersBean
.
getGmtCreate
())));
responseVo
.
setOrderCreateTime
(
yyyyMMddHHmmss
.
format
(
new
Date
(
ordersBean
.
getGmtCreate
())));
//到店的用餐方式有:打包带走、店内就餐 ,外卖没有用餐方式
if
(
OrderType
.
COLLECT_GOODS
.
getCode
().
equals
(
ordersBean
.
getType
()))
{
responseVo
.
setTakeOut
(
1
);
responseVo
.
setTakeOutDesc
(
"打包带走"
);
}
else
if
(
OrderType
.
EAT_IN
.
getCode
().
equals
(
ordersBean
.
getType
()))
{
responseVo
.
setTakeOut
(
0
);
responseVo
.
setTakeOutDesc
(
"店内就餐"
);
}
else
{
responseVo
.
setTakeOut
(
0
);
responseVo
.
setTakeOutDesc
(
""
);
}
/*
if (OrderType.COLLECT_GOODS.getCode().equals(ordersBean.getType())) {
if (OrderType.COLLECT_GOODS.getCode().equals(ordersBean.getType())) {
responseVo.setTakeOut(1);
responseVo.setTakeOut(1);
responseVo.setTakeOutDesc("打包带走");
responseVo.setTakeOutDesc("打包带走");
...
@@ -922,6 +937,7 @@ public class OrderAdapter {
...
@@ -922,6 +937,7 @@ public class OrderAdapter {
responseVo.setTakeOut(0);
responseVo.setTakeOut(0);
responseVo.setTakeOutDesc("店内就餐");
responseVo.setTakeOutDesc("店内就餐");
}
}
*/
responseVo
.
setTableNumber
(
ordersBean
.
getBarCounter
());
responseVo
.
setTableNumber
(
ordersBean
.
getBarCounter
());
responseVo
.
setPayStatus
(
ordersBean
.
getPayStatus
());
responseVo
.
setPayStatus
(
ordersBean
.
getPayStatus
());
responseVo
.
setPayStatusDesc
(
Optional
.
ofNullable
(
PayStatus
.
getByCode
(
ordersBean
.
getPayStatus
()))
responseVo
.
setPayStatusDesc
(
Optional
.
ofNullable
(
PayStatus
.
getByCode
(
ordersBean
.
getPayStatus
()))
...
@@ -952,6 +968,9 @@ public class OrderAdapter {
...
@@ -952,6 +968,9 @@ public class OrderAdapter {
responseVo
.
setOrderStatusFlows
(
orderChangeTime
);
responseVo
.
setOrderStatusFlows
(
orderChangeTime
);
responseVo
.
setOrderStatusDesc
(
orderViewStatusDto
.
getOrderStatusDesc
());
responseVo
.
setOrderStatusDesc
(
orderViewStatusDto
.
getOrderStatusDesc
());
responseVo
.
setOrderStatusDescText
(
orderViewStatusDto
.
getOrderStatusDescText
());
responseVo
.
setOrderStatusDescText
(
orderViewStatusDto
.
getOrderStatusDescText
());
if
(
CollectionUtils
.
isNotEmpty
(
ordersBean
.
getRefundList
()))
{
responseVo
.
setRefundTips
(
orderViewStatusDto
.
getRefundStatusText
());
}
responseVo
.
setTakeMealFlows
(
getTakeMealFlows
(
ordersBean
));
responseVo
.
setTakeMealFlows
(
getTakeMealFlows
(
ordersBean
));
responseVo
.
setRiderName
(
orderViewStatusDto
.
getRiderName
());
responseVo
.
setRiderName
(
orderViewStatusDto
.
getRiderName
());
responseVo
.
setRiderText
(
orderViewStatusDto
.
getRiderText
());
responseVo
.
setRiderText
(
orderViewStatusDto
.
getRiderText
());
...
@@ -985,8 +1004,8 @@ public class OrderAdapter {
...
@@ -985,8 +1004,8 @@ public class OrderAdapter {
responseVo
.
setButtonEvaluate
(
orderViewStatusDto
.
getButtonEvaluate
());
responseVo
.
setButtonEvaluate
(
orderViewStatusDto
.
getButtonEvaluate
());
responseVo
.
setButtonMealCode
(
orderViewStatusDto
.
getButtonMealCode
());
responseVo
.
setButtonMealCode
(
orderViewStatusDto
.
getButtonMealCode
());
responseVo
.
setOrderType
(
ordersBean
.
getType
());
responseVo
.
setOrderType
(
ordersBean
.
getType
());
responseVo
.
setOrderTypeDesc
(
Optional
.
ofNullable
(
OrderType
.
getByCode
(
ordersBean
.
getType
()))
responseVo
.
setOrderTypeDesc
(
Optional
.
ofNullable
(
OrderType
Gather
.
getByCode
(
ordersBean
.
getType
()))
.
map
(
OrderType:
:
getDesc
).
orElse
(
""
));
.
map
(
OrderType
Gather
:
:
getDesc
).
orElse
(
""
));
responseVo
.
setOrderRemark
(
ordersBean
.
getRemark
());
responseVo
.
setOrderRemark
(
ordersBean
.
getRemark
());
if
(
ordersBean
.
getGmtModified
()
!=
null
)
{
if
(
ordersBean
.
getGmtModified
()
!=
null
)
{
responseVo
.
setModifiedTime
(
DateUtil
.
convert2String
(
new
Date
(
ordersBean
.
getGmtModified
()),
"yyyy-MM-dd HH:mm:ss"
));
responseVo
.
setModifiedTime
(
DateUtil
.
convert2String
(
new
Date
(
ordersBean
.
getGmtModified
()),
"yyyy-MM-dd HH:mm:ss"
));
...
@@ -1288,13 +1307,15 @@ public class OrderAdapter {
...
@@ -1288,13 +1307,15 @@ public class OrderAdapter {
orderViewStatusDto
.
setButtonRefund
(
checkRefundButton
(
orderBean
,
wxAppId
));
orderViewStatusDto
.
setButtonRefund
(
checkRefundButton
(
orderBean
,
wxAppId
));
orderViewStatusDto
.
setButtonMealCode
(
true
);
orderViewStatusDto
.
setButtonMealCode
(
true
);
}
}
//申请退款
if
(
refundBean
!=
null
&&
RefundStatus
.
APPLY_REFUND
.
getCode
().
equals
(
refundBean
.
getStatus
()))
{
if
(
refundBean
!=
null
&&
RefundStatus
.
APPLY_REFUND
.
getCode
().
equals
(
refundBean
.
getStatus
()))
{
setApplyRefundDesc
(
orderViewStatusDto
,
orderBean
);
setApplyRefundDesc
(
orderViewStatusDto
,
orderBean
);
}
}
//同意退款
if
(
refundBean
!=
null
&&
RefundStatus
.
AGREE_REFUND
.
getCode
().
equals
(
refundBean
.
getStatus
()))
{
if
(
refundBean
!=
null
&&
RefundStatus
.
AGREE_REFUND
.
getCode
().
equals
(
refundBean
.
getStatus
()))
{
setAgreeRefundDesc
(
orderViewStatusDto
,
orderBean
);
setAgreeRefundDesc
(
orderViewStatusDto
,
orderBean
);
}
}
//已退货
if
(
refundBean
!=
null
&&
RefundStatus
.
ALREADY_REFUND
.
getCode
().
equals
(
refundBean
.
getStatus
()))
{
if
(
refundBean
!=
null
&&
RefundStatus
.
ALREADY_REFUND
.
getCode
().
equals
(
refundBean
.
getStatus
()))
{
setAgreeRefundDesc
(
orderViewStatusDto
,
orderBean
);
setAgreeRefundDesc
(
orderViewStatusDto
,
orderBean
);
}
}
...
@@ -1475,24 +1496,28 @@ public class OrderAdapter {
...
@@ -1475,24 +1496,28 @@ public class OrderAdapter {
orderViewStatusDto
.
setOrderStatus
(
OrderStatus
.
CALCEL
.
getCode
());
orderViewStatusDto
.
setOrderStatus
(
OrderStatus
.
CALCEL
.
getCode
());
orderViewStatusDto
.
setOrderStatusDesc
(
"已退款"
);
orderViewStatusDto
.
setOrderStatusDesc
(
"已退款"
);
orderViewStatusDto
.
setOrderStatusDescText
(
"感谢您对我们的信任,期待再次光临~"
);
orderViewStatusDto
.
setOrderStatusDescText
(
"感谢您对我们的信任,期待再次光临~"
);
orderViewStatusDto
.
setRefundStatusText
(
"订单金额已原路退还,请及时查看~"
);
orderViewStatusDto
.
setButtonContactPartner
(
true
);
orderViewStatusDto
.
setButtonContactPartner
(
true
);
}
}
if
(
refundBean
!=
null
&&
RefundStatus
.
ALREADY_REFUND
.
getCode
().
equals
(
refundBean
.
getStatus
()))
{
if
(
refundBean
!=
null
&&
RefundStatus
.
ALREADY_REFUND
.
getCode
().
equals
(
refundBean
.
getStatus
()))
{
orderViewStatusDto
.
setOrderStatus
(
OrderStatus
.
CALCEL
.
getCode
());
orderViewStatusDto
.
setOrderStatus
(
OrderStatus
.
CALCEL
.
getCode
());
orderViewStatusDto
.
setOrderStatusDesc
(
"退款中"
);
orderViewStatusDto
.
setOrderStatusDesc
(
"退款中"
);
orderViewStatusDto
.
setOrderStatusDescText
(
"感谢您对我们的信任,期待再次光临~"
);
orderViewStatusDto
.
setOrderStatusDescText
(
"感谢您对我们的信任,期待再次光临~"
);
orderViewStatusDto
.
setRefundStatusText
(
"正在退款中,请稍等"
);
orderViewStatusDto
.
setButtonContactPartner
(
true
);
orderViewStatusDto
.
setButtonContactPartner
(
true
);
}
}
if
(
OrderStatus
.
REFUSE
.
getCode
().
equals
(
orderBean
.
getStatus
()))
{
if
(
OrderStatus
.
REFUSE
.
getCode
().
equals
(
orderBean
.
getStatus
()))
{
orderViewStatusDto
.
setOrderStatus
(
OrderStatus
.
REFUSE
.
getCode
());
orderViewStatusDto
.
setOrderStatus
(
OrderStatus
.
REFUSE
.
getCode
());
orderViewStatusDto
.
setOrderStatusDesc
(
"已退款"
);
orderViewStatusDto
.
setOrderStatusDesc
(
"已退款"
);
orderViewStatusDto
.
setOrderStatusDescText
(
"感谢您对我们的信任,期待再次光临~"
);
orderViewStatusDto
.
setOrderStatusDescText
(
"感谢您对我们的信任,期待再次光临~"
);
orderViewStatusDto
.
setRefundStatusText
(
"订单金额已原路退还,请及时查看~"
);
orderViewStatusDto
.
setButtonContactPartner
(
true
);
orderViewStatusDto
.
setButtonContactPartner
(
true
);
}
}
if
(
PayStatus
.
HAVE_REFUND
.
getCode
().
equals
(
orderBean
.
getPayStatus
()))
{
if
(
PayStatus
.
HAVE_REFUND
.
getCode
().
equals
(
orderBean
.
getPayStatus
()))
{
orderViewStatusDto
.
setOrderStatus
(
OrderStatus
.
REFUSE
.
getCode
());
orderViewStatusDto
.
setOrderStatus
(
OrderStatus
.
REFUSE
.
getCode
());
orderViewStatusDto
.
setOrderStatusDesc
(
"已退款"
);
orderViewStatusDto
.
setOrderStatusDesc
(
"已退款"
);
orderViewStatusDto
.
setOrderStatusDescText
(
"感谢您对我们的信任,期待再次光临~"
);
orderViewStatusDto
.
setOrderStatusDescText
(
"感谢您对我们的信任,期待再次光临~"
);
orderViewStatusDto
.
setRefundStatusText
(
"订单金额已原路退还,请及时查看~"
);
orderViewStatusDto
.
setButtonContactPartner
(
true
);
orderViewStatusDto
.
setButtonContactPartner
(
true
);
}
}
...
@@ -1500,12 +1525,14 @@ public class OrderAdapter {
...
@@ -1500,12 +1525,14 @@ public class OrderAdapter {
// TODO: 2019/9/9 获取商户退款配置
// TODO: 2019/9/9 获取商户退款配置
if
(
refundBean
!=
null
&&
refundBean
.
getStatus
()
!=
null
)
{
if
(
refundBean
!=
null
&&
refundBean
.
getStatus
()
!=
null
)
{
orderViewStatusDto
.
setButtonRefund
(
false
);
orderViewStatusDto
.
setButtonRefund
(
false
);
orderViewStatusDto
.
setRefundStatusText
(
"商家会处理退款申请,请稍后"
);
}
else
{
}
else
{
orderViewStatusDto
.
setButtonRefund
(
checkRefundButton
(
orderBean
,
wxAppId
));
orderViewStatusDto
.
setButtonRefund
(
checkRefundButton
(
orderBean
,
wxAppId
));
}
}
orderViewStatusDto
.
setOrderStatus
(
OrderStatus
.
COMPLETE
.
getCode
());
orderViewStatusDto
.
setOrderStatus
(
OrderStatus
.
COMPLETE
.
getCode
());
orderViewStatusDto
.
setOrderStatusDesc
(
"已完成"
);
orderViewStatusDto
.
setOrderStatusDesc
(
"已完成"
);
orderViewStatusDto
.
setOrderStatusDescText
(
"
感谢您对我们的信任,期待再次光临
~"
);
orderViewStatusDto
.
setOrderStatusDescText
(
"
订单已完成,记得来评价一下哦
~"
);
orderViewStatusDto
.
setButtonContactPartner
(
true
);
orderViewStatusDto
.
setButtonContactPartner
(
true
);
orderViewStatusDto
.
setButtonEvaluate
(
true
);
orderViewStatusDto
.
setButtonEvaluate
(
true
);
if
(
OrderType
.
TAKE_OUT
.
getCode
().
equals
(
orderBean
.
getType
()))
{
if
(
OrderType
.
TAKE_OUT
.
getCode
().
equals
(
orderBean
.
getType
()))
{
...
@@ -1904,18 +1931,20 @@ public class OrderAdapter {
...
@@ -1904,18 +1931,20 @@ public class OrderAdapter {
productBean1
.
setSonProducts
(
new
ArrayList
<>());
productBean1
.
setSonProducts
(
new
ArrayList
<>());
return
productBean1
;
return
productBean1
;
}
}
//申请
public
void
setApplyRefundDesc
(
OrderViewStatusDto
orderViewStatusDto
,
QueryOrdersResponse
.
DataBean
.
OrderBean
orderBean
)
{
public
void
setApplyRefundDesc
(
OrderViewStatusDto
orderViewStatusDto
,
QueryOrdersResponse
.
DataBean
.
OrderBean
orderBean
)
{
orderViewStatusDto
.
setOrderStatus
(
orderBean
.
getStatus
());
orderViewStatusDto
.
setOrderStatus
(
orderBean
.
getStatus
());
orderViewStatusDto
.
setOrderStatusDesc
(
"退款中"
);
orderViewStatusDto
.
setOrderStatusDesc
(
"退款中"
);
orderViewStatusDto
.
setOrderStatusDescText
(
"感谢您对我们的信任,期待再次光临~"
);
orderViewStatusDto
.
setOrderStatusDescText
(
"感谢您对我们的信任,期待再次光临~"
);
orderViewStatusDto
.
setRefundStatusText
(
"商家会处理退款申请,请稍后"
);
orderViewStatusDto
.
setButtonContactPartner
(
true
);
orderViewStatusDto
.
setButtonContactPartner
(
true
);
}
}
//同意
public
void
setAgreeRefundDesc
(
OrderViewStatusDto
orderViewStatusDto
,
QueryOrdersResponse
.
DataBean
.
OrderBean
orderBean
)
{
public
void
setAgreeRefundDesc
(
OrderViewStatusDto
orderViewStatusDto
,
QueryOrdersResponse
.
DataBean
.
OrderBean
orderBean
)
{
orderViewStatusDto
.
setOrderStatus
(
orderBean
.
getStatus
());
orderViewStatusDto
.
setOrderStatus
(
orderBean
.
getStatus
());
orderViewStatusDto
.
setOrderStatusDesc
(
"退款中"
);
orderViewStatusDto
.
setOrderStatusDesc
(
"退款中"
);
orderViewStatusDto
.
setOrderStatusDescText
(
"感谢您对我们的信任,期待再次光临~"
);
orderViewStatusDto
.
setOrderStatusDescText
(
"感谢您对我们的信任,期待再次光临~"
);
orderViewStatusDto
.
setRefundStatusText
(
"商家会处理退款申请,请稍后"
);
orderViewStatusDto
.
setButtonContactPartner
(
true
);
orderViewStatusDto
.
setButtonContactPartner
(
true
);
}
}
...
...
order-application-service/src/main/java/cn/freemud/entities/dto/OrderViewStatusDto.java
View file @
fd61cca6
...
@@ -61,6 +61,8 @@ public class OrderViewStatusDto {
...
@@ -61,6 +61,8 @@ public class OrderViewStatusDto {
* 取餐码按钮
* 取餐码按钮
*/
*/
private
Boolean
buttonMealCode
;
private
Boolean
buttonMealCode
;
/**
* 售后单文案描述
*/
private
String
refundStatusText
;
}
}
order-application-service/src/main/java/cn/freemud/entities/vo/QueryOrderResponseVo.java
View file @
fd61cca6
...
@@ -194,6 +194,10 @@ public class QueryOrderResponseVo {
...
@@ -194,6 +194,10 @@ public class QueryOrderResponseVo {
private
String
refundReason
;
private
String
refundReason
;
/**
/**
* 退款文案提示 若48小时后商家未处理,自动同意/拒绝退款
*/
private
String
refundTips
;
/**
* 退款单
* 退款单
*/
*/
private
String
rid
;
private
String
rid
;
...
...
order-application-service/src/main/java/cn/freemud/enums/OrderTypeGather.java
0 → 100644
View file @
fd61cca6
package
cn
.
freemud
.
enums
;
/**
* All rights Reserved, Designed By www.freemud.cn
*
* @Title: cn.freemud.enums OrderTypeGather
* @Description: TDO 描述....
* @author: family
* @date: 2020/5/7
* @Copyright: www.freemud.cn Inc. All rights reserved.
* 注意:本内容仅限于上海非码科技内部传阅,禁止外泄以及用于其他的商业目
*/
public
enum
OrderTypeGather
{
TAKE_OUT
(
1
,
"外卖"
),
PRE_ORDER
(
2
,
"预订单"
),
MALL
(
3
,
"商城"
),
COLLECT_GOODS
(
4
,
"到店"
),
EAT_IN
(
5
,
"到店"
);
private
Integer
code
;
private
String
desc
;
//订单服务订单类型 1=外卖 4=自提,5=堂食
//外卖平台订单类型 1=常规堂食,2=预约堂食,3=常规外送,4=预约外送,5=常规自取,6=预约自取
OrderTypeGather
(
Integer
code
,
String
desc
)
{
this
.
code
=
code
;
this
.
desc
=
desc
;
}
public
static
OrderTypeGather
getByCode
(
Integer
code
)
{
if
(
code
==
null
)
{
return
null
;
}
for
(
OrderTypeGather
orderTypeGather
:
values
())
{
if
(
orderTypeGather
.
getCode
().
equals
(
code
))
{
return
orderTypeGather
;
}
}
return
null
;
}
public
Integer
getCode
()
{
return
code
;
}
public
void
setCode
(
Integer
code
)
{
this
.
code
=
code
;
}
public
String
getDesc
()
{
return
desc
;
}
public
void
setDesc
(
String
desc
)
{
this
.
desc
=
desc
;
}
}
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