From a85ab71180fdcb02b3cae304ebc96bb2ca12423c Mon Sep 17 00:00:00 2001 From: Pu Zhibing <393733352@qq.com> Date: 星期五, 01 十一月 2024 17:24:14 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- 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