Commit 173db880 by ping.wu

老订单类型转新订单枚举

parent 3691499c
......@@ -2750,4 +2750,46 @@ public class OrderSdkAdapter {
return totalWeight;
}
/**
* 匹配订单类型
*
* @param orderType
* @return
*/
public OrderType getNewOrderTypeEnum(Integer orderType, Long gmtExpect) {
if (orderType == null) {
return null;
}
switch (orderType) {
case 1:
// 外卖
if (gmtExpect == null || gmtExpect == 0L) {
return OrderType.GENERAL_EXPRESS;
} else {
return OrderType.RESERVED_EXPRESS;
}
case 4:
// 自取
if (gmtExpect == null || gmtExpect == 0L) {
return OrderType.GENERAL_SELF_PICKUP;
} else {
return OrderType.RESERVED_SELF_PICKUP;
}
case 5:
// 堂食
if (gmtExpect == null || gmtExpect == 0L) {
return OrderType.GENERAL_DINE_IN;
} else {
return OrderType.RESERVED_DINE_IN;
}
default:
return null;
}
}
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment