|
|
@@ -0,0 +1,40 @@
|
|
|
+package com.sckw.core.common.enums.enums;
|
|
|
+
|
|
|
+import lombok.AllArgsConstructor;
|
|
|
+import lombok.Getter;
|
|
|
+
|
|
|
+/**
|
|
|
+ * @author lfdc
|
|
|
+ * @description 枚举字典
|
|
|
+ * @date 2023-07-07 14:07:23
|
|
|
+ */
|
|
|
+@Getter
|
|
|
+@AllArgsConstructor
|
|
|
+public enum DictEnum {
|
|
|
+ PRICE_TYPE_0("price_type", "0", "元/吨"),
|
|
|
+ PRICE_TYPE_1("price_type", "1", "元/车"),
|
|
|
+ TRADE_TYPE_0("trade_type", "0", "预付款"),
|
|
|
+ TRADE_TYPE_1("trade_type", "1", "货到付款"),
|
|
|
+ TRADE_TYPE_2("trade_type", "2", "线下付款"),
|
|
|
+ ADDRESS_TYPE_0("address_type", "0", "矿山"),
|
|
|
+ INDUSTRY_TYPE_0("industry_type", "0", "砂石"),
|
|
|
+ CLASSIFICATION_TYPE_0("classification_type", "0", "石料"),
|
|
|
+ CATEGORY_TYPE_0("category_type", "0", "山砂"),
|
|
|
+ PRODUCT_NAME_TYPE_0("product_name_type", "0", "毛石"),
|
|
|
+ GOODS_STATUS_0("goods_status", "0", "已保存"),
|
|
|
+ GOODS_STATUS_1("goods_status", "1", "已上架"),
|
|
|
+ GOODS_STATUS_2("goods_status", "2", "已下架");
|
|
|
+ private final String type;
|
|
|
+ private final String value;
|
|
|
+ private final String label;
|
|
|
+
|
|
|
+ public static String getLabel(String type, String value) {
|
|
|
+ for (DictEnum dict : DictEnum.values()) {
|
|
|
+ if (dict.getType().equals(type) && dict.getValue().equals(value)) {
|
|
|
+ return dict.getLabel();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+
|
|
|
+}
|