| | |
| | | mallGoodsSku.setPresentPrice(new BigDecimal(addMallGoodsSkuDto.getPresentPrice())); |
| | | // mallGoodsSku.setPresentPrice(new BigDecimal(addMallGoodsSkuDto.getOriginalPrice())); |
| | | |
| | | mallGoodsSku.setLevelOnePrice(new BigDecimal(addMallGoodsSkuDto.getLevelOnePrice())); |
| | | mallGoodsSku.setLevelTwoPrice(new BigDecimal(addMallGoodsSkuDto.getLevelTwoPrice())); |
| | | mallGoodsSku.setLevelThreePrice(new BigDecimal(addMallGoodsSkuDto.getLevelThreePrice())); |
| | | // mallGoodsSku.setLevelOnePrice(new BigDecimal(addMallGoodsSkuDto.getLevelOnePrice())); |
| | | // mallGoodsSku.setLevelTwoPrice(new BigDecimal(addMallGoodsSkuDto.getLevelTwoPrice())); |
| | | // mallGoodsSku.setLevelThreePrice(new BigDecimal(addMallGoodsSkuDto.getLevelThreePrice())); |
| | | mallGoodsSku.setStyleId(mallGoodsStyleSku.getId()); |
| | | mallGoodsSku.setCostPrice(addMallGoodsSkuDto.getCostPrice()); |
| | | mallGoodsSku.setGoodsId(mallGoods.getId()); |
| | |
| | | // 如果该样式下sku全删除,则删除该样式 |
| | | List<MallGoodsStyle> styles = mallGoodsStyleMapper.selectByGoodsId(mallGoods.getId()); |
| | | for (MallGoodsStyle style : styles) { |
| | | if (CollUtil.isEmpty(style.getSkus())) { |
| | | mallGoodsStyleMapper.deleteById(style.getId()); |
| | | Long id = style.getId(); |
| | | QueryWrapper<MallGoodsSku> objectQueryWrapper1 = new QueryWrapper<>(); |
| | | objectQueryWrapper1.eq("style_id",id); |
| | | List<MallGoodsSku> mallGoodsSkus = mallGoodsSkuMapper.selectList(objectQueryWrapper1); |
| | | if (CollUtil.isEmpty(mallGoodsSkus)) { |
| | | mallGoodsStyleMapper.deleteById(id); |
| | | } |
| | | } |
| | | } |