Commit 716537ee by 周晓航

添加注释 维护枚举类

Signed-off-by: 周晓航 <xiaohang.zhou@freemud.com>
parent ae30af97
......@@ -12,19 +12,31 @@
*/
package cn.freemud.enums;
import com.freemud.sdk.api.assortment.order.adapter.OrderSdkAdapter;
import com.google.common.collect.Lists;
import org.springframework.util.CollectionUtils;
import java.util.ArrayList;
import java.util.List;
/**
* 基础服务订单类型如下:
* 1=常规堂食,
* 2=预约堂食,
* 3=常规外送,
* 4=预约外送,
* 5=常规自取,
* 6=预约自取
*
* @see OrderSdkAdapter#getOldOrderType(java.lang.Integer)
* 该类为老订单类型:
*/
public enum OrderType {
TAKE_OUT(1, "外卖","takeOut"),
PRE_ORDER(2, "预订单","preOrder"),
MALL(3, "商城","mall"),
COLLECT_GOODS(4, "打包带走","collectGoods"),
EAT_IN(5, "店内就餐","eatIn")
;
TAKE_OUT(1, "外卖", "takeOut"),
PRE_ORDER(2, "预订单", "preOrder"),
MALL(3, "商城", "mall"),
COLLECT_GOODS(4, "打包带走", "collectGoods"),
EAT_IN(5, "店内就餐", "eatIn");
private Integer code;
private String desc;
......@@ -33,7 +45,7 @@ public enum OrderType {
*/
private String tackDesc;
OrderType(Integer code, String desc,String tackDesc) {
OrderType(Integer code, String desc, String tackDesc) {
this.code = code;
this.desc = desc;
this.tackDesc = tackDesc;
......@@ -66,7 +78,7 @@ public enum OrderType {
return returnList;
}
for (OrderType orderType : values()) {
for (Integer code: list) {
for (Integer code : list) {
if (orderType.getCode().equals(code)) {
returnList.add(code);
}
......
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