| | |
| | | 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) { |
| | |
| | | } |
| | | shopGoodsAttrDO.setIsDefault(1); |
| | | shopGoodsAttrDO.setPrice(goodsAttr.getAttrPrice()); |
| | | shopGoodsAttrDO.setAttrPic(images[0]); |
| | | goodsAttrDOS.add(shopGoodsAttrDO); |
| | | }); |
| | | if (goodsAttrDOS.size() > 0) { |