huliguo
2025-04-08 02d5cf98ab127c3464ecc6fb9342b2d700e4a0de
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/GoodsServiceImpl.java
@@ -258,7 +258,7 @@
    @Override
    @Transactional(rollbackFor = Exception.class)
    public void addGoods(Goods goods) {
        goods.setSaleNum(0);
       /* goods.setSaleNum(0);
        goods.setStatus(GoodsStatus.DOWN.getCode());
        goodsMapper.insert(goods);
@@ -270,18 +270,18 @@
                throw new NullPointerException("请选择指定门店");
            }
            saveGoodsShopList(goodsShopList, goods.getId());
        }
        }*/
    }
    @Override
    public void updateManageGoods(Goods goods) {
        this.updateById(goods);
       /* this.updateById(goods);
        //修改个别字段
        this.update(new LambdaUpdateWrapper<Goods>().eq(Goods::getId, goods.getId()).set(Goods::getSellingPrice, goods.getSellingPrice())
                .set(Goods::getIntegral, goods.getIntegral()));
        // 指定门店
        List<GoodsShop> goodsShopList = goods.getGoodsShopList();
        saveGoodsShopList(goodsShopList, goods.getId());
        saveGoodsShopList(goodsShopList, goods.getId());*/
    }
@@ -322,7 +322,7 @@
                goodsShop.setAddress(shop.getAddress());
            }
        }
        goods.setGoodsShopList(goodsShops);
//        goods.setGoodsShopList(goodsShops);
        return goods;
    }
@@ -366,7 +366,7 @@
            throw new IllegalArgumentException("金额不能为null或负数");
        }
        // 获取积分兑换比例配置
        R<SysConfig> info = sysConfigClient.getInfo("6");
        R<SysConfig> info = sysConfigClient.getInfo(6L);
        if (info == null || info.getData() == null) {
            throw new RuntimeException("获取积分兑换比例配置失败");
        }