|
@@ -451,7 +451,7 @@ public class GoodsServiceImpl extends ServiceImpl<GoodsMapper, Goods> implements
|
|
|
payStatus.add(3L);
|
|
|
//查看是否有出售过
|
|
|
OrderGoods orderGoods = iOrderGoodsService.getOne(new LambdaQueryWrapper< OrderGoods >().eq(OrderGoods::getGoodsId,entity.getGoodsId())
|
|
|
- .in(OrderGoods::getPayStatus,payStatus).last("limit 1"));
|
|
|
+ .in(OrderGoods::getPayStatus,payStatus).ne(OrderGoods::getRefundStatus,2).last("limit 1"));
|
|
|
if(Validator.isNotEmpty(orderGoods)){
|
|
|
throw new CustomException("该商品已被购买过,无法改变状态");
|
|
|
}
|