From 8c2a413d2574151a2bc762aa0779f766de48160b Mon Sep 17 00:00:00 2001
From: phpcjl <phpcjl@gmail.com>
Date: 星期一, 16 十二月 2024 18:14:01 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/GoodsBargainPriceController.java |   44 ++++++++++++++++++++++++--------------------
 1 files changed, 24 insertions(+), 20 deletions(-)

diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/GoodsBargainPriceController.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/GoodsBargainPriceController.java
index bce64c6..12d044e 100644
--- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/GoodsBargainPriceController.java
+++ b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/GoodsBargainPriceController.java
@@ -7,10 +7,14 @@
 import com.ruoyi.account.api.model.AppUser;
 import com.ruoyi.common.core.domain.R;
 import com.ruoyi.common.core.utils.StringUtils;
+import com.ruoyi.common.core.web.controller.BaseController;
+import com.ruoyi.common.core.web.page.TableDataInfo;
 import com.ruoyi.common.security.service.TokenService;
 import com.ruoyi.other.api.domain.*;
 import com.ruoyi.other.api.vo.GetGoodsBargainPrice;
 import com.ruoyi.other.service.*;
+import com.ruoyi.other.vo.ShopGoodsList;
+import com.ruoyi.other.vo.ShopGoodsListVo;
 import com.ruoyi.system.api.model.LoginUser;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
@@ -64,8 +68,6 @@
     /**
      * 根据商品id和会员等级获取门店特价
      *
-     * @param goodsBargainPrice
-     * @return
      */
     @PostMapping("/getGoodsBargainPrice")
     public R<GoodsBargainPriceDetail> getGoodsBargainPrice(@RequestBody GetGoodsBargainPrice goodsBargainPrice) {
@@ -176,28 +178,30 @@
                 .eq(!CollectionUtils.isEmpty(goodsIds), GoodsBargainPrice::getGoodsId, goodsId)
                 .eq(auditStatus != null, GoodsBargainPrice::getAuditStatus, auditStatus));
 
-        page.getRecords().forEach(goodsBargainPrice -> {
-            goodsList.stream()
-                    .filter(goods -> goods.getId().equals(goodsBargainPrice.getGoodsId()))
-                    .findFirst().ifPresent(g -> {
-                        GoodsCategory goodsCategory = goodsCategoryService.getById(g.getGoodsCategoryId());
-                        Integer shopId = goodsBargainPrice.getShopId();
-                        Shop shop = shopService.getById(shopId);
-                        R<AppUser> r = appUserClient.getAppUserByPhone(shop.getPhone());
-                        if (R.isError(r)){
-                            throw new RuntimeException("获取店长信息失败");
-                        }
-                        goodsBargainPrice.setOwnerName(r.getData().getName());
-                        goodsBargainPrice.setOwnerPhone(shop.getPhone());
-                        goodsBargainPrice.setShopName(shop.getName());
-                        goodsBargainPrice.setGoodsName(g.getName());
-                        goodsBargainPrice.setCategoryName(goodsCategory.getName());
-                    });
-        });
+        page.getRecords().forEach(goodsBargainPrice -> goodsList.stream()
+                .filter(goods -> goods.getId().equals(goodsBargainPrice.getGoodsId()))
+                .findFirst().ifPresent(g -> {
+                    GoodsCategory goodsCategory = goodsCategoryService.getById(g.getGoodsCategoryId());
+                    Integer shopId = goodsBargainPrice.getShopId();
+                    Shop shop = shopService.getById(shopId);
+                    R<AppUser> r = appUserClient.getAppUserByPhone1(shop.getPhone());
+                    if (R.isError(r)){
+                        throw new RuntimeException("获取店长信息失败");
+                    }
+                    goodsBargainPrice.setOwnerName(r.getData().getName());
+                    goodsBargainPrice.setOwnerPhone(shop.getPhone());
+                    goodsBargainPrice.setShopName(shop.getName());
+                    goodsBargainPrice.setGoodsName(g.getName());
+                    goodsBargainPrice.setCategoryName(goodsCategory.getName());
+                }));
 
         return R.ok(page);
     }
 
 
+    
+    
+    
+    
 }
 

--
Gitblit v1.7.1