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","$","ws://ws-us.js-stock.top/"),
|
HK("HK","香港股票","39",PropertiesUtil.getProperty("HK_HTTP_API"),PropertiesUtil.getProperty("HK_KEY"),"HKD","HK$","ws://test-ws.js-stock.top/"),
|
MAS("MAS","马来西亚股票","42",PropertiesUtil.getProperty("MY_HTTP_API"),PropertiesUtil.getProperty("MY_KEY"),"MYR","RM","ws://api-my-ws.js-stock.top/"),
|
KR("KR","韩国股票","11",PropertiesUtil.getProperty("KR_HTTP_API"),PropertiesUtil.getProperty("KR_KEY"),"KRW","₩","http://api-kr-ws.js-stock.top/"),
|
IN("IN","印度股票","14", PropertiesUtil.getProperty("IN_HTTP_API"),PropertiesUtil.getProperty("IN_KEY"),"INR","₹","ws://ws.is4vc.com:8001/websocket-server/");
|
// 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;
|
|
private String ws_url;
|
|
EStockType(String code, String typeDesc, String contryId, String stockUrl, String stockKey,String symbol,String symbol1,String ws_url) {
|
this.code = code;
|
this.typeDesc = typeDesc;
|
this.contryId = contryId;
|
this.stockUrl = stockUrl;
|
this.stockKey = stockKey;
|
this.symbol = symbol;
|
this.symbol1 = symbol1;
|
this.ws_url = ws_url;
|
}
|
|
public static EStockType getEStockTypeByCode(String code){
|
if(EStockType.US.getCode().equals(code)){
|
return US;
|
|
}else if(EStockType.HK.getCode().equals(code)){
|
return HK;
|
}else if(EStockType.MAS.getCode().equals(code)){
|
return MAS;
|
}else if(EStockType.IN.getCode().equals(code)){
|
return IN;
|
}else{
|
return MAS;
|
}
|
}
|
|
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;
|
}
|
|
public String getWsUrl() {
|
return ws_url;
|
}
|
|
|
|
|
}
|