From f9e4883831956328e73f4df77c8d6887a0f8d70b Mon Sep 17 00:00:00 2001
From: rk <94314517@qq.com>
Date: 星期一, 11 五月 2026 10:41:46 +0800
Subject: [PATCH] 小程序   接口开发

---
 server/dmmall_service/src/main/java/com/doumee/service/business/impl/GoodsServiceImpl.java |   24 ++++--------------------
 1 files changed, 4 insertions(+), 20 deletions(-)

diff --git a/server/dmmall_service/src/main/java/com/doumee/service/business/impl/GoodsServiceImpl.java b/server/dmmall_service/src/main/java/com/doumee/service/business/impl/GoodsServiceImpl.java
index 0d731d5..71ef791 100644
--- a/server/dmmall_service/src/main/java/com/doumee/service/business/impl/GoodsServiceImpl.java
+++ b/server/dmmall_service/src/main/java/com/doumee/service/business/impl/GoodsServiceImpl.java
@@ -372,17 +372,9 @@
                     .eq(GoodsSku::getIsdeleted,Constants.ZERO)
                     .in(GoodsSku::getGoodsId,idList));
         }
-        long shopNum   = shopMapper.selectCount(new QueryWrapper<Shop>().lambda()
-                .eq(Shop::getIsdeleted,Constants.ZERO)
-                .eq(Shop::getStatus,Constants.ZERO));
-        MPJLambdaWrapper<Goods> queryWrapper = new MPJLambdaWrapper<>();
-        queryWrapper.selectAll(Goods.class);
-        queryWrapper.select("(select count(s.id) from shop_goods_relation s  " +
-                "left join shop g on s.SHOP_ID =g.id " +
-                "where g.status=0 and s.ISDELETED=0 and s.GOODS_ID=t.id) as pricedShopNum ");
-        queryWrapper.eq(GoodsSku::getIsdeleted,Constants.ZERO);
-        queryWrapper.in(Goods::getId,idList);
-        List<Goods> goodsList= goodsAdminJoinMapper.selectJoinList(Goods.class,queryWrapper);
+        List<Goods> goodsList= goodsMapper.selectList(new QueryWrapper<Goods>().lambda()
+                .eq(Goods::getIsdeleted,Constants.ZERO)
+                .in(Goods::getId,idList));
         if(goodsList==null || goodsList.size() == 0){
             throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(), "鍟嗗搧淇℃伅鏌ヨ鏃犳晥 ");
         }
@@ -409,14 +401,6 @@
                  throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(), goods.getName()+":鍟嗗搧鍟嗗搧灏氭湭璁剧疆闆跺敭浠凤紝鏃犳硶涓婃灦");
                 }
             }
-            if(Constants.formatLongNum(goods.getPricedShopNum()) < shopNum){
-                //榛樿sku淇℃伅
-                s =false;
-                if(idList.size()==1){
-                  throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(), goods.getName()+":鏈夋湭璁剧疆渚涜揣浠风殑缁忛攢鍟嗭紝鏃犳硶涓婃灦");
-                }
-
-            }
             if(s){
                 idList2.add(param.getId());
             }
@@ -432,7 +416,7 @@
 
         if(successNum != idList.size()){
             if( idList.size()>1){
-                throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(), "鎴愬姛涓婃灦鍟嗗搧鏁帮細銆�"+successNum+"銆戯紝涓婃灦澶辫触锛氥��"+(idList.size()-successNum)+"銆戜釜鍟嗗搧,璇风‘淇濆緟涓婃灦鍟嗗搧鐨勫潎閿�鍞环鍜屼緵璐т环宸茶缃�");
+                throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(), "鎴愬姛涓婃灦鍟嗗搧鏁帮細銆�"+successNum+"銆戯紝涓婃灦澶辫触锛氥��"+(idList.size()-successNum)+"銆戜釜鍟嗗搧,璇风‘淇濆緟涓婃灦鍟嗗搧鐨勯攢鍞环宸茶缃�");
             }else {
                 throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode()," 涓婃灦澶辫触");
             }

--
Gitblit v1.9.3