luodangjia
2024-10-23 a00dbefc3837ab7781f9d50cd8ddb1261a416b79
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/TGoodsServiceImpl.java
@@ -83,10 +83,10 @@
        // 订单号加上商品类型
        String res = string+"-"+dto.getType();
//        List<Integer> data = orderClient.getSalesCountByGoodsId(res).getData();
//        for (int i = 0; i < list.size(); i++) {
//            list.get(i).setSalesCount(data.get(i));
//        }
        List<Integer> data = orderClient.getSalesCountByGoodsId(res).getData();
        for (int i = 0; i < list.size(); i++) {
            list.get(i).setSalesCount(data.get(i));
        }
        pageInfo.setRecords(list);
        return pageInfo;
    }