mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-21 19:45:09 +08:00
转换订单状态描述
This commit is contained in:
@@ -159,6 +159,14 @@ public interface IOrderBasicInfoService {
|
||||
*/
|
||||
void updateOrderStatusById(List<String> orderIds, String orderStatus);
|
||||
|
||||
/**
|
||||
* 通过订单状态和支付状态 转换订单状态描述
|
||||
* @param orderStatus 订单状态
|
||||
* @param payStatus 支付状态
|
||||
* @return 订单状态描述
|
||||
*/
|
||||
String transformOrderStatusDescribe(String orderStatus, String payStatus);
|
||||
|
||||
/**
|
||||
* 查询时间段内订单总金额和总用电量
|
||||
*/
|
||||
|
||||
@@ -179,29 +179,39 @@ public class OrderBasicInfoServiceImpl implements IOrderBasicInfoService {
|
||||
orderListVO.setOutTradeNo(wxpayCallbackRecord.getOutTradeNo());
|
||||
}
|
||||
orderListVO.setPileConnectorCode(orderListVO.getPileSn() + orderListVO.getConnectorCode());
|
||||
|
||||
// 订单状态描述
|
||||
String orderStatus = orderListVO.getOrderStatus(); // 订单状态
|
||||
String payStatus = orderListVO.getPayStatus(); // 支付状态
|
||||
String orderStatusDescribe;
|
||||
if (StringUtils.equals(orderStatus, OrderStatusEnum.NOT_START.getValue())) {
|
||||
// 未启动还有两种情况 待支付 / 支付成功
|
||||
if (StringUtils.equals(payStatus, OrderPayStatusEnum.paid.getValue())) {
|
||||
// 支付成功,未启动
|
||||
orderStatusDescribe = OrderPayStatusEnum.paid.getLabel() + ", " + OrderStatusEnum.getOrderStatus(orderStatus);
|
||||
} else {
|
||||
// 待支付
|
||||
orderStatusDescribe = OrderPayStatusEnum.unpaid.getLabel();
|
||||
}
|
||||
} else {
|
||||
orderStatusDescribe = OrderStatusEnum.getOrderStatus(orderStatus);
|
||||
}
|
||||
orderListVO.setOrderStatusDescribe(orderStatusDescribe);
|
||||
orderListVO.setOrderStatusDescribe(transformOrderStatusDescribe(orderListVO.getOrderStatus(), orderListVO.getPayStatus()));
|
||||
}
|
||||
}
|
||||
return orderListVOS;
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过订单状态和支付状态 转换订单状态描述
|
||||
* @param orderStatus
|
||||
* @param payStatus
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public String transformOrderStatusDescribe(String orderStatus, String payStatus) {
|
||||
// 订单状态描述
|
||||
// String orderStatus = orderListVO.getOrderStatus(); // 订单状态
|
||||
// String payStatus = orderListVO.getPayStatus(); // 支付状态
|
||||
String orderStatusDescribe;
|
||||
if (StringUtils.equals(orderStatus, OrderStatusEnum.NOT_START.getValue())) {
|
||||
// 未启动还有两种情况 待支付 / 支付成功
|
||||
if (StringUtils.equals(payStatus, OrderPayStatusEnum.paid.getValue())) {
|
||||
// 支付成功,未启动
|
||||
orderStatusDescribe = OrderPayStatusEnum.paid.getLabel() + ", " + OrderStatusEnum.getOrderStatus(orderStatus);
|
||||
} else {
|
||||
// 待支付
|
||||
orderStatusDescribe = OrderPayStatusEnum.unpaid.getLabel();
|
||||
}
|
||||
} else {
|
||||
orderStatusDescribe = OrderStatusEnum.getOrderStatus(orderStatus);
|
||||
}
|
||||
return orderStatusDescribe;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询时间段内订单总金额和总用电量
|
||||
*
|
||||
|
||||
@@ -58,6 +58,7 @@ public class OrderDetailInfoVO {
|
||||
public static class OrderInfo {
|
||||
private String orderCode; // 订单编号
|
||||
private String orderStatus; // 订单状态
|
||||
private String orderStatusDescribe; // 订单状态描述
|
||||
private String startTime; // 充电开始时间
|
||||
private String endTime; // 充电结束时间
|
||||
private String stopReasonMsg; // 停止原因
|
||||
|
||||
Reference in New Issue
Block a user