| | |
| | | |
| | | |
| | | public static void setCacheCompanies(Stock stock,String companiesInfo){ |
| | | RedisShardedPoolUtils.set(RedisKeyConstant.RK_REAL_TIME_STOCK+":"+stock.getStockType()+":"+stock.getStockCode(), |
| | | RedisShardedPoolUtils.set(RedisKeyConstant.RK_COMPANY_INFO+":"+stock.getStockType()+":"+stock.getStockCode(), |
| | | new Gson().toJson(companiesInfo)); |
| | | } |
| | | |
| | | |
| | | public static JSONObject getCacheCompanies(Stock stock){ |
| | | String companiesInfo = RedisShardedPoolUtils.get(RedisKeyConstant.RK_REAL_TIME_STOCK+":"+stock.getStockType()+":"+stock.getStockCode()); |
| | | String companiesInfo = RedisShardedPoolUtils.get(RedisKeyConstant.RK_COMPANY_INFO+":"+stock.getStockType()+":"+stock.getStockCode()); |
| | | if(companiesInfo.isEmpty()){ |
| | | return null; |
| | | } |