| | |
| | | |
| | | 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$"), |
| | | |
| | | IN("IN","印度股票","14", PropertiesUtil.getProperty("JS_IN_HTTP_URL"),PropertiesUtil.getProperty("JS_IN_KEY"),"INR","₹"), |
| | | |
| | | //MX("MEX","墨西哥股票","7",PropertiesUtil.getProperty("MX_HTTP_API"),PropertiesUtil.getProperty("MX_KEY"),"MXN","MX$"), |
| | | |
| | | TW("TW","台湾股票","46",PropertiesUtil.getProperty("TW_HTTP_API"),PropertiesUtil.getProperty("TW_KEY"),"TWD","NT$"); |
| | | JP("JP","日本股票","35",PropertiesUtil.getProperty("JP_HTTP_API"),PropertiesUtil.getProperty("JP_KEY"),"JPY","¥"); |
| | | |
| | | |
| | | private String code; |
| | |
| | | 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.IN.getCode().equals(code)){ |
| | | return IN; |
| | | }else if(EStockType.TW.getCode().equals(code)){ |
| | | return TW; |
| | | }else if(EStockType.JP.getCode().equals(code)){ |
| | | return JP; |
| | | }else{ |
| | | return US; |
| | | } |
| | |
| | | public static boolean isExistByCode(String code){ |
| | | if(EStockType.US.getCode().equals(code)){ |
| | | return true; |
| | | }else if(EStockType.HK.getCode().equals(code)){ |
| | | return true; |
| | | }else if(EStockType.IN.getCode().equals(code)){ |
| | | return true; |
| | | }else if(EStockType.TW.getCode().equals(code)){ |
| | | }else if(EStockType.JP.getCode().equals(code)){ |
| | | return true; |
| | | }else{ |
| | | return false; |
| | |
| | | public static EStockType getEStockTypeBySymbol(String symbol){ |
| | | if(EStockType.US.getSymbol().equals(symbol)){ |
| | | return US; |
| | | }else if(EStockType.HK.getSymbol().equals(symbol)){ |
| | | return HK; |
| | | }else if(EStockType.IN.getSymbol().equals(symbol)){ |
| | | return IN; |
| | | }else if(EStockType.TW.getSymbol().equals(symbol)){ |
| | | return TW; |
| | | }else if(EStockType.JP.getSymbol().equals(symbol)){ |
| | | return JP; |
| | | }else{ |
| | | return null; |
| | | } |