zyy
2025-07-16 5a766206055d0268e051e44d9b8b39d411142426
src/main/java/com/nq/service/impl/StockServiceImpl.java
@@ -758,10 +758,10 @@
    public ServerResponse getIndicesList(String stockType) {
        try {
            String codeList;
            if (stockType.equals(EStockType.US.getCode())) {
                codeList = PropertiesUtil.getProperty("us_home_indices_code");
            } else {
            if(stockType.equals(EStockType.MX.getCode()) || stockType.equals("MX")) {
                codeList = PropertiesUtil.getProperty("mx_home_indices_code");
            } else {
                codeList = PropertiesUtil.getProperty("us_home_indices_code");
            }
            List<String> stockCodeList = Arrays.asList(codeList.split(","));
@@ -785,9 +785,16 @@
    @Override
    public ServerResponse getIndicesAndKData(String pid, String stockType) {
        try {
            Stock stock = stockMapper.selectOne(new QueryWrapper<Stock>().eq("stock_code", pid));
            if (stock == null) {
                return ServerResponse.createByErrorMsg("无股票信息");
            }
            stockType = stock.getStockType();
            Map<String, Object> resultMap = new HashMap<>();
            DataStockBean cacheBaseStock = RedisKeyUtil.getCacheBaseStock(stockType, pid);
            if (cacheBaseStock != null) {
                resultMap.put("id", cacheBaseStock.getId());
                resultMap.put("stockType", stockType);
                resultMap.put("name", cacheBaseStock.getName());
                resultMap.put("last", cacheBaseStock.getLast());
                resultMap.put("chg", cacheBaseStock.getChg());