1
zj
2024-07-12 c2cf572d823f5ab410fd82ae169f012caf3386c7
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
package org.example.enums;
 
 
import org.example.constant.StockConstant;
 
/**
 * 股票类型
 * */
 
public enum EStockType {
 
 
    IN("IN","印度股票","14", StockConstant.HTTP_API, StockConstant.KEY),
    JP("JP","日本股票","35", StockConstant.JP_HTTP_API,StockConstant.JP_KEY),
    US("US","美国股票","5",StockConstant.US_API_URL,StockConstant.US_KEY);
    private String code;
    private String typeDesc;
    public String contryId;
 
    public String stockUrl;
    public  String stockKey;
 
 
    EStockType(String code, String typeDesc, String contryId, String stockUrl, String stockKey) {
        this.code = code;
        this.typeDesc = typeDesc;
        this.contryId = contryId;
        this.stockUrl = stockUrl;
        this.stockKey = stockKey;
    }
 
    public static EStockType getEStockTypeByCode(String code){
        if(EStockType.US.getCode().equals(code)){
            return US;
        }else{
            return  IN;
        }
    }
 
    public String getContryId() {
        return contryId;
    }
 
    public String getStockUrl() {
        return stockUrl;
    }
 
    public String getStockKey() {
        return stockKey;
    }
 
    public String getCode() {
        return code;
    }
 
    public String getTypeDesc() {
        return typeDesc;
    }
 
 
 
 
}