no
DESKTOP-71BH0QO\L、ming
2021-04-20 3ce3f20b50e85b53b161438134f187409bcd65a5
no
1个文件已修改
6 ■■■■■ 已修改文件
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComShopGoodsServiceImpl.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComShopGoodsServiceImpl.java
@@ -52,8 +52,13 @@
        if (addShopGoodsVO == null) {
            return R.ok("500", "数据为空!");
        }
        String[] images = addShopGoodsVO.getGoodsPic().split(",");
        ComShopGoodsDO shopGoodsDO = new ComShopGoodsDO();
        BeanUtils.copyProperties(addShopGoodsVO, shopGoodsDO);
        if(images.length>1){
            shopGoodsDO.setGoodsPic(images[0]);
        }
        shopGoodsDO.setImages(addShopGoodsVO.getGoodsPic());
        shopGoodsDO.setSale(0);
        int goodsId = this.baseMapper.insert(shopGoodsDO);
        if (goodsId > 0) {
@@ -76,6 +81,7 @@
                }
                shopGoodsAttrDO.setIsDefault(1);
                shopGoodsAttrDO.setPrice(goodsAttr.getAttrPrice());
                shopGoodsAttrDO.setAttrPic(images[0]);
                goodsAttrDOS.add(shopGoodsAttrDO);
            });
            if (goodsAttrDOS.size() > 0) {