From ea6bf9042d9ad4faaf328bdc68a41ef36b47f13d Mon Sep 17 00:00:00 2001
From: luodangjia <luodangjia>
Date: 星期二, 14 一月 2025 20:09:55 +0800
Subject: [PATCH] 12.18
---
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/GoodsServiceImpl.java | 15 ++++++++++-----
1 files changed, 10 insertions(+), 5 deletions(-)
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 5c48683..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);
@@ -260,7 +260,7 @@
}
Integer integer = orderClient.getGoodsSaleNum(goods.getId(), 1).getData();
goodsVO.setSaleNum(integer);
- GoodsEvaluate goodsEvaluate = goodsEvaluateService.lambdaQuery().eq(GoodsEvaluate::getGoodsId, goodsId)
+ GoodsEvaluate goodsEvaluate = goodsEvaluateService.lambdaQuery().eq(GoodsEvaluate::getGoodsId, goodsId).ne(GoodsEvaluate::getComment, "")
.orderByDesc(GoodsEvaluate::getGrade).eq(GoodsEvaluate::getStatus, 2).isNotNull(GoodsEvaluate::getComment)
.eq(GoodsEvaluate::getDelFlag, 0).last(" limit 0, 1").one();
if (null != goodsEvaluate) {
@@ -308,7 +308,12 @@
@Override
public IPage<Goods> getManageGoodsList(Page<Goods> page, Goods goods) {
- return goodsMapper.selectManageGoodsList(page, goods);
+ IPage<Goods> goodsIPage = goodsMapper.selectManageGoodsList(page, goods);
+ goodsIPage.getRecords().forEach(goods1 -> {
+ Integer data = orderClient.getGoodsSaleNum(goods1.getId(), 1).getData();
+ goods1.setSaleNum(data);
+ });
+ return goodsIPage;
}
@Override
@@ -389,7 +394,7 @@
area.setProvinceCode(goodsArea.getProvinceCode());
area.setCityCode(goodsArea.getCityCode());
area.setDistrictsCode(goodsArea.getDistrictsCode());
- if(null != area.getSellingPrice() && null != area.getIntegral()){
+ if(null != area.getSellingPrice() || null != area.getIntegral()){
goodsAreaList2.add(area);
}
}
--
Gitblit v1.7.1