| | |
| | | //新增商品 |
| | | MallGoods mallGoods = MallGoodsConversion.INSTANCE.dtoToEntity(addMallGoodsDto); |
| | | mallGoods.setIsSale(MallGoods.ISSALE_STATUS_DISABLED); |
| | | |
| | | if (mallGoods.getHasCarriage() == 2) { |
| | | mallGoods.setCarriage(BigDecimal.ZERO); |
| | | } |
| | | mallGoodsMapper.insert(mallGoods); |
| | | |
| | | String thumbs = addMallGoodsDto.getThumbs(); |
| | |
| | | } |
| | | |
| | | BeanUtil.copyProperties(mallGoodsUpdateDto, mallGoods); |
| | | if (mallGoods.getHasCarriage() == 2) { |
| | | mallGoods.setCarriage(BigDecimal.ZERO); |
| | | } |
| | | |
| | | mallGoodsMapper.updateById(mallGoods); |
| | | |
| | | mallGoodsImagesMapper.deleteByGoodsId(mallGoodsUpdateDto.getId()); |