| | |
| | | } |
| | | |
| | | MallGoods mallGoods = mallGoodsMapper.selectById(sku.getGoodsId()); |
| | | // 零撸专区购买 |
| | | if (new BigDecimal(mallGoods.getPresentPrice()).compareTo(BigDecimal.ZERO) == 0) { |
| | | List<MallOrderItem> items = mallOrderItemMapper.selectItemByGoodsIdUnCancel(mallGoods.getId(), member.getId()); |
| | | if (CollUtil.isNotEmpty(items)) { |
| | | throw new FebsException("无法重复领取同一个商品"); |
| | | } |
| | | } |
| | | // todo 纯积分商品一个账号限制购买一次 |
| | | // if (new BigDecimal(mallGoods.getPresentPrice()).compareTo(BigDecimal.ZERO) == 0) { |
| | | // List<MallOrderItem> items = mallOrderItemMapper.selectItemByGoodsIdUnCancel(mallGoods.getId(), member.getId()); |
| | | // if (CollUtil.isNotEmpty(items)) { |
| | | // throw new FebsException("积分商品一个账号只能购买一次"); |
| | | // } |
| | | // } |
| | | |
| | | if (MallGoods.ISSALE_STATUS_DISABLED.equals(mallGoods.getIsSale())) { |
| | | throw new FebsException(mallGoods.getGoodsName() + "已下架"); |
| | |
| | | ScoreFlowTypeEnum.PAY_BALANCE.getValue(), |
| | | orderInfo.getOrderNo(), |
| | | FlowTypeEnum.BALANCE.getValue(), |
| | | StrUtil.format(ScoreFlowTypeEnum.PAY_BALANCE.getDesc(),orderInfo.getScoreAmount()), |
| | | StrUtil.format(ScoreFlowTypeEnum.PAY_BALANCE.getDesc(),orderInfo.getAmount()), |
| | | 2 |
| | | ); |
| | | agentProducer.sendOrderCoupon(orderInfo.getId()); |
| | |
| | | if (ObjectUtil.isNull(orderInfo)) { |
| | | throw new FebsException("订单不存在"); |
| | | } |
| | | List<MallOrderItem> items = orderInfo.getItems(); |
| | | if(CollUtil.isNotEmpty(items)){ |
| | | for(MallOrderItem mallOrderItem : items){ |
| | | mallOrderItem.setItemAmount(mallOrderItemMapper.selectById(mallOrderItem.getId()).getAmount()); |
| | | mallOrderItem.setScoreAmount(mallOrderItemMapper.selectById(mallOrderItem.getId()).getScoreAmount()); |
| | | } |
| | | } |
| | | // List<MallOrderItem> items = orderInfo.getItems(); |
| | | // if(CollUtil.isNotEmpty(items)){ |
| | | // for(MallOrderItem mallOrderItem : items){ |
| | | // mallOrderItem.setItemAmount(mallOrderItemMapper.selectById(mallOrderItem.getId()).getAmount()); |
| | | // mallOrderItem.setScoreAmount(mallOrderItemMapper.selectById(mallOrderItem.getId()).getScoreAmount()); |
| | | // } |
| | | // } |
| | | |
| | | OrderDetailVo orderDetailVo = MallOrderInfoConversion.INSTANCE.entityToDetailVo(orderInfo); |
| | | |
| | |
| | | mallGoodsComment.setSkuName(mallGoodsSku.getSkuName()); |
| | | mallGoodsComment.setStyleId(mallGoodsSku.getStyleId()); |
| | | mallGoodsComment.setStyleName(mallGoodsSku.getStyleName()); |
| | | mallGoodsComment.setShowState(MallGoodsComment.SHOW_STATE_ENABLE); |
| | | mallGoodsComment.setShowState(MallGoodsComment.SHOW_STATE_DISABLED); |
| | | mallGoodsCommentMapper.insert(mallGoodsComment); |
| | | } |
| | | } |