|
|
package com.yoho.ufo.order.constant;
|
|
|
|
|
|
import com.yoho.core.config.ConfigReader;
|
|
|
import com.yohobuy.ufo.model.order.common.OrderAttributes;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
import java.util.HashMap;
|
|
|
import java.util.Map;
|
|
|
|
|
|
/**
|
|
|
* Created by li.ma on 2019/4/15.
|
|
|
*/
|
|
|
@Service
|
|
|
public class OrderConfigConstant {
|
|
|
private static Map<Integer, String> orderAttributeMap = new HashMap<>();
|
|
|
|
|
|
static {
|
|
|
orderAttributeMap.put(OrderAttributes.ADVANCE_SALE.getCode(), "预售");
|
|
|
orderAttributeMap.put(OrderAttributes.OFFLINE.getCode(), "线下店");
|
|
|
orderAttributeMap.put(OrderAttributes.SECOND_HAND.getCode(), "二手");
|
|
|
orderAttributeMap.put(OrderAttributes.FLAW.getCode(), "全新瑕疵");
|
|
|
orderAttributeMap.put(OrderAttributes.COMMON_IN_STOCK.getCode(), "现货");
|
|
|
orderAttributeMap.put(OrderAttributes.QUICK_DELIVER.getCode(), "急速发货");
|
|
|
}
|
|
|
|
|
|
@Autowired
|
|
|
private ConfigReader configReader;
|
|
|
|
...
|
...
|
@@ -16,4 +31,13 @@ public class OrderConfigConstant { |
|
|
public boolean getVedioConfig() {
|
|
|
return configReader.getBoolean("ufo.Vedio.Config", true);
|
|
|
}
|
|
|
|
|
|
public static Map<Integer, String> getOrderAttributeMap() {
|
|
|
return orderAttributeMap;
|
|
|
}
|
|
|
|
|
|
public static String getOrderAttributeStr(Integer attribute) {
|
|
|
String attributeStr = orderAttributeMap.get(attribute);
|
|
|
return null == attributeStr ? "" : attributeStr;
|
|
|
}
|
|
|
} |
...
|
...
|
|