From ea4e6cf0a63fa8470846fd5188da9e912faf661e Mon Sep 17 00:00:00 2001
From: 无关风月 <443237572@qq.com>
Date: 星期五, 01 十一月 2024 10:01:24 +0800
Subject: [PATCH] Merge branch 'master' of http://120.76.84.145:10101/gitblit/r/java/mx_charging_pile

---
 ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/TGoodsController.java |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/TGoodsController.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/TGoodsController.java
index 3ea9ee4..c003b2e 100644
--- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/TGoodsController.java
+++ b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/TGoodsController.java
@@ -125,7 +125,7 @@
 
     @GetMapping("/getInfoByType")
     @ApiOperation(tags = {"小程序-兑换商城"},value = "商品查看详情")
-    public R getInfoByType(Integer goodType,Integer id) {
+    public R getInfoByType(Integer goodType,Integer id,Integer type) {
         if (goodType==1){
         TGoods byId = goodsService.getById(id);
         if (byId==null||byId.getStatus()==2){
@@ -135,7 +135,8 @@
 //            for (int i = 0; i < list.size(); i++) {
 //                list.get(i).setSalesCount(data.get(i));
 //            }
-
+            Integer data = orderClient.getSalesCountByGoodsIdgetCount(byId.getId(), 1, type).getData();
+            byId.setSalesCount(data);
         return R.ok(byId);
         }
         else {
@@ -143,7 +144,9 @@
             if (byId==null||byId.getStatus()==2){
                 return R.fail(2,"该商品已不存在");
             }
-                return R.ok(byId);
+            Integer data = orderClient.getSalesCountByGoodsIdgetCount(byId.getId(),2, type).getData();
+            byId.setSalesCount(data);
+            return R.ok(byId);
             }
     }
 

--
Gitblit v1.7.1