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;
|
}
|
|
|
|
|
}
|