From a1777c21fbfffc5c2c190fdac20dee88eb16eca4 Mon Sep 17 00:00:00 2001
From: luodangjia <luodangjia>
Date: 星期二, 14 一月 2025 16:54:39 +0800
Subject: [PATCH] 12.18
---
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/GoodsService.java | 2 +-
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/GoodsController.java | 5 ++++-
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/GoodsServiceImpl.java | 4 ++--
3 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/GoodsController.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/GoodsController.java
index 4aafb17..5903a7e 100644
--- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/GoodsController.java
+++ b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/GoodsController.java
@@ -179,7 +179,10 @@
*/
@GetMapping("/goodsDetail/{goodsId}")
@ApiOperation(value = "商品详情", tags = {"小程序-商城-首页"})
- public R<GoodsVO> goodsDetail(@PathVariable("goodsId") Long goodsId, String longitude, String latitude){
+ public R<GoodsVO> goodsDetail(@PathVariable("goodsId") Long goodsId,
+ Integer shopId,
+ String longitude,
+ String latitude){
return R.ok(goodsService.goodsDetail(goodsId, longitude, latitude));
}
diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/GoodsService.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/GoodsService.java
index 3d2b3e2..59f4ee2 100644
--- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/GoodsService.java
+++ b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/GoodsService.java
@@ -21,7 +21,7 @@
PageInfo<GoodsVO> goodsList(Goods goods);
- GoodsVO goodsDetail(Long goodsId, String longitude, String latitude);
+ GoodsVO goodsDetail(Long goodsId, Integer shopId, String longitude, String latitude);
List<Goods> getGoodsListByShopId(PageInfo<Goods> pageInfo, Integer shopId);
diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/GoodsServiceImpl.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/GoodsServiceImpl.java
index eb913c4..3344af0 100644
--- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/GoodsServiceImpl.java
+++ b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/GoodsServiceImpl.java
@@ -183,7 +183,7 @@
}
@Override
- public GoodsVO goodsDetail(Long goodsId, String longitude, String latitude) {
+ public GoodsVO goodsDetail(Long goodsId, Integer shopId, String longitude, String latitude) {
if (goodsId == null || goodsId <= 0) {
throw new NullPointerException("商品ID不能为空");
}
@@ -216,7 +216,7 @@
BeanUtils.copyBeanProp(goodsVO, goods);
goodsVO.setGoodsId(goods.getId());
goodsVO.setGoodsName(goods.getName());
- Price price = getPrice(vipId, goods.getId(), null, 1, provinceCode, cityCode, districtCode);
+ Price price = getPrice(vipId, goods.getId(), shopId, 1, provinceCode, cityCode, districtCode);
if(null != price){
goodsVO.setPointPayment(price.getPointPayment() ? 1 : 0);
goodsVO.setCashPayment(price.getCashPayment() ? 1 : 0);
--
Gitblit v1.7.1