key
zyy
2025-08-06 da1a9940f1ee441a058cd6e2a6021f3d59a299a4
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
package com.nq.enums;
 
 
import com.nq.utils.PropertiesUtil;
 
/**
 * 股票类型
 * */
 
public enum EStockType {
 
 
 
    US("US","美国股票","5",PropertiesUtil.getProperty("US_HTTP_API"),PropertiesUtil.getProperty("US_KEY"),"USD","$"),
 
    HK("HK","香港股票","39",PropertiesUtil.getProperty("HK_HTTP_API"),PropertiesUtil.getProperty("HK_KEY"),"HKD","HK$"),
//    MAS("MAS","马来西亚股票","42",PropertiesUtil.getProperty("MAS_HTTP_API"),PropertiesUtil.getProperty("MAS_KEY"),"MYR","RM"),
//
    IN("IN","印度股票","14", PropertiesUtil.getProperty("JS_IN_HTTP_API"),PropertiesUtil.getProperty("JS_IN_KEY"),"INR","₹"),
    MX("MEX","墨西哥股票","7",PropertiesUtil.getProperty("MX_HTTP_API"),PropertiesUtil.getProperty("MX_KEY"),"MXN","MX$");
 
//    TH("TH","泰国股票","41",PropertiesUtil.getProperty("TH_HTTP_API"),PropertiesUtil.getProperty("TH_KEY")),
//    HG("HG","韩国股票","11",PropertiesUtil.getProperty("HG_HTTP_API"),PropertiesUtil.getProperty("HG_KEY")),
//    SZHB("SZHB","数字货币","41",PropertiesUtil.getProperty("SZHB_HTTP_API"),PropertiesUtil.getProperty("SZHB_KEY"));
    private String code;
    private String typeDesc;
    public String contryId;
 
    public String stockUrl;
    public  String stockKey;
 
    private String symbol;
 
    private String symbol1;
 
 
    EStockType(String code, String typeDesc, String contryId, String stockUrl, String stockKey,String  symbol,String symbol1) {
        this.code = code;
        this.typeDesc = typeDesc;
        this.contryId = contryId;
        this.stockUrl = stockUrl;
        this.stockKey = stockKey;
        this.symbol = symbol;
        this.symbol1 = symbol1;
    }
 
    public static EStockType getEStockTypeByCode(String code){
        if(EStockType.US.getCode().equals(code)){
            return US;
        }else if(EStockType.MX.getCode().equals(code)){
            return  MX;
        }else{
            return  MX;
        }
    }
 
    //根据货币获取类型
    public static EStockType getEStockTypeBySymbol(String symbol){
        if(EStockType.US.getSymbol().equals(symbol)){
            return US;
        }else if(EStockType.MX.getSymbol().equals(symbol)){
            return  MX;
        }else{
            return  MX;
        }
    }
 
    public String getContryId() {
        return contryId;
    }
 
    public String getStockUrl() {
        return stockUrl;
    }
 
    public String getStockKey() {
        return stockKey;
    }
 
    public String getCode() {
        return code;
    }
 
    public String getSymbol() {
        return symbol;
    }
 
    public void setSymbol(String symbol) {
        this.symbol = symbol;
    }
 
    public String getSymbol1() {
        return symbol1;
    }
 
    public void setSymbol1(String symbol1) {
        this.symbol1 = symbol1;
    }
 
    public String getTypeDesc() {
        return typeDesc;
    }
 
 
 
 
}