From 73be7ff2317fea8194b7a6dc0452b64a511c7836 Mon Sep 17 00:00:00 2001
From: Pu Zhibing <393733352@qq.com>
Date: 星期三, 06 十一月 2024 18:42:38 +0800
Subject: [PATCH] 合并代码

---
 ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/TGoodsServiceImpl.java |   12 ++++--------
 1 files changed, 4 insertions(+), 8 deletions(-)

diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/TGoodsServiceImpl.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/TGoodsServiceImpl.java
index 7a58640..d5e2f68 100644
--- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/TGoodsServiceImpl.java
+++ b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/TGoodsServiceImpl.java
@@ -60,7 +60,6 @@
     @Override
     public PageInfo<TGoods> pageList1(AppGoodQuery basePage) {
         GoodsDTO dto = new GoodsDTO();
-        dto.setType(2);
         dto.setStatus(1);
         dto.setPageCurr(basePage.getPageCurr());
         dto.setPageSize(basePage.getPageSize());
@@ -79,14 +78,11 @@
             pageInfo.setRecords(list);
             return pageInfo;
         }
-        String string = stringBuilder.toString();
-        // 订单号加上商品类型
-        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));
+        for (TGoods tGoods : list) {
+            Integer data = orderClient.getSalesCountByGoodsIdgetCount(tGoods.getId(), tGoods.getGoodType(), basePage.getType()).getData();
+            tGoods.setSalesCount(data);
         }
+
         pageInfo.setRecords(list);
         return pageInfo;
     }

--
Gitblit v1.7.1