|
@@ -375,6 +375,12 @@ public class OrderServiceImpl extends ServiceImpl<OrderMapper, Order> implements
|
|
|
if (!canRepeatBuy && goods.getGoodsType() != 3 && goods.getGoodsType() != 4) {
|
|
|
this.checkBuyGoods(g.getGoodsId(), bo.getUserId(), goods.getGoodsType());
|
|
|
}
|
|
|
+ if (goods.getGoodsType() == 6) {
|
|
|
+ //直播商品
|
|
|
+ if(Validator.isNotEmpty(oldOrderGoodsId)&&oldOrderGoodsId.longValue()>0){
|
|
|
+ throw new CustomException("直播商品不允许复购");
|
|
|
+ }
|
|
|
+ }
|
|
|
//商品0元加入免费商品列表
|
|
|
if (orderGoods.getGoodsPrice().compareTo(BigDecimal.ZERO) == 0) {
|
|
|
freeList.add(orderGoods);
|
|
@@ -508,6 +514,12 @@ public class OrderServiceImpl extends ServiceImpl<OrderMapper, Order> implements
|
|
|
if (!canRepeatBuy && goods.getGoodsType() != 3 && goods.getGoodsType() != 4) {
|
|
|
this.checkBuyGoods(g.getGoodsId(), bo.getUserId(), goods.getGoodsType());
|
|
|
}
|
|
|
+ if (goods.getGoodsType() == 6) {
|
|
|
+ //直播商品
|
|
|
+ if(Validator.isNotEmpty(oldOrderGoodsId)&&oldOrderGoodsId.longValue()>0){
|
|
|
+ throw new CustomException("直播商品不允许复购");
|
|
|
+ }
|
|
|
+ }
|
|
|
//商品0元或已收费加入收费商品列表
|
|
|
if (g.getGoodsRealPrice().compareTo(BigDecimal.ZERO) == 0) {
|
|
|
//免费的
|
|
@@ -681,6 +693,12 @@ public class OrderServiceImpl extends ServiceImpl<OrderMapper, Order> implements
|
|
|
if (!canRepeatBuy && goods.getGoodsType() != 3 && goods.getGoodsType() != 4) {
|
|
|
this.checkBuyGoods(g.getGoodsId(), bo.getUserId(), goods.getGoodsType());
|
|
|
}
|
|
|
+ if (goods.getGoodsType() == 6) {
|
|
|
+ //直播商品
|
|
|
+ if(Validator.isNotEmpty(oldOrderGoodsId)&&oldOrderGoodsId.longValue()>0){
|
|
|
+ throw new CustomException("直播商品不允许复购");
|
|
|
+ }
|
|
|
+ }
|
|
|
iShoppingCartService.deleteByGoodsId(g.getGoodsId(), bo.getUserId());
|
|
|
//商品0元加入免费商品列表
|
|
|
if (orderGoods.getGoodsPrice().compareTo(BigDecimal.ZERO) == 0) {
|
|
@@ -825,6 +843,12 @@ public class OrderServiceImpl extends ServiceImpl<OrderMapper, Order> implements
|
|
|
if (!canRepeatBuy && goods.getGoodsType() != 3 && goods.getGoodsType() != 4) {
|
|
|
this.checkBuyGoods(g.getGoodsId(), bo.getUserId(), goods.getGoodsType());
|
|
|
}
|
|
|
+ if (goods.getGoodsType() == 6) {
|
|
|
+ //直播商品
|
|
|
+ if(Validator.isNotEmpty(oldOrderGoodsId)&&oldOrderGoodsId.longValue()>0){
|
|
|
+ throw new CustomException("直播商品不允许复购");
|
|
|
+ }
|
|
|
+ }
|
|
|
iShoppingCartService.deleteByGoodsId(g.getGoodsId(), bo.getUserId());
|
|
|
//商品0元加入免费商品列表
|
|
|
if (orderGoods.getGoodsPrice().compareTo(BigDecimal.ZERO) == 0) {
|