|
@@ -263,7 +263,7 @@ public class OrderServiceImpl extends ServiceImpl<OrderMapper, Order> implements
|
|
//订单商品
|
|
//订单商品
|
|
Goods goods = iGoodsService.getOne(new LambdaQueryWrapper<Goods>().eq(Goods::getGoodsId, g.getGoodsId()));
|
|
Goods goods = iGoodsService.getOne(new LambdaQueryWrapper<Goods>().eq(Goods::getGoodsId, g.getGoodsId()));
|
|
if (goods.getGoodsStatus() != 1) {
|
|
if (goods.getGoodsStatus() != 1) {
|
|
- throw new CustomException("商品尚未上架");
|
|
|
|
|
|
+ throw new CustomException(goods.getGoodsName()+"商品已下架,请重新选择商品下单");
|
|
}
|
|
}
|
|
OrderGoods orderGoods = BeanUtil.toBean(g, OrderGoods.class);
|
|
OrderGoods orderGoods = BeanUtil.toBean(g, OrderGoods.class);
|
|
orderGoods.setOrderSn(out_trade_no);
|
|
orderGoods.setOrderSn(out_trade_no);
|
|
@@ -398,7 +398,7 @@ public class OrderServiceImpl extends ServiceImpl<OrderMapper, Order> implements
|
|
//订单商品
|
|
//订单商品
|
|
Goods goods = iGoodsService.getOne(new LambdaQueryWrapper<Goods>().eq(Goods::getGoodsId, g.getGoodsId()));
|
|
Goods goods = iGoodsService.getOne(new LambdaQueryWrapper<Goods>().eq(Goods::getGoodsId, g.getGoodsId()));
|
|
if (goods.getGoodsStatus() != 1) {
|
|
if (goods.getGoodsStatus() != 1) {
|
|
- throw new CustomException("商品尚未上架", 510);
|
|
|
|
|
|
+ throw new CustomException(goods.getGoodsName()+"商品已下架,请重新选择商品下单", 510);
|
|
}
|
|
}
|
|
OrderGoods orderGoods = BeanUtil.toBean(g, OrderGoods.class);
|
|
OrderGoods orderGoods = BeanUtil.toBean(g, OrderGoods.class);
|
|
orderGoods.setOrderSn(out_trade_no);
|
|
orderGoods.setOrderSn(out_trade_no);
|
|
@@ -570,7 +570,7 @@ public class OrderServiceImpl extends ServiceImpl<OrderMapper, Order> implements
|
|
//订单商品
|
|
//订单商品
|
|
Goods goods = iGoodsService.getOne(new LambdaQueryWrapper<Goods>().eq(Goods::getGoodsId, g.getGoodsId()));
|
|
Goods goods = iGoodsService.getOne(new LambdaQueryWrapper<Goods>().eq(Goods::getGoodsId, g.getGoodsId()));
|
|
if (goods.getGoodsStatus() != 1) {
|
|
if (goods.getGoodsStatus() != 1) {
|
|
- throw new CustomException("商品尚未上架");
|
|
|
|
|
|
+ throw new CustomException(goods.getGoodsName()+"商品已下架,请重新选择商品下单");
|
|
}
|
|
}
|
|
body = "中正祥粤云-" + goods.getGoodsName();
|
|
body = "中正祥粤云-" + goods.getGoodsName();
|
|
OrderGoods orderGoods = BeanUtil.toBean(g, OrderGoods.class);
|
|
OrderGoods orderGoods = BeanUtil.toBean(g, OrderGoods.class);
|
|
@@ -713,7 +713,7 @@ public class OrderServiceImpl extends ServiceImpl<OrderMapper, Order> implements
|
|
//订单商品
|
|
//订单商品
|
|
Goods goods = iGoodsService.getOne(new LambdaQueryWrapper<Goods>().eq(Goods::getGoodsId, g.getGoodsId()));
|
|
Goods goods = iGoodsService.getOne(new LambdaQueryWrapper<Goods>().eq(Goods::getGoodsId, g.getGoodsId()));
|
|
if (goods.getGoodsStatus() != 1) {
|
|
if (goods.getGoodsStatus() != 1) {
|
|
- throw new CustomException("商品尚未上架");
|
|
|
|
|
|
+ throw new CustomException(goods.getGoodsName()+"商品已下架,请重新选择商品下单");
|
|
}
|
|
}
|
|
body = "中正祥粤云-" + goods.getGoodsName();
|
|
body = "中正祥粤云-" + goods.getGoodsName();
|
|
OrderGoods orderGoods = BeanUtil.toBean(g, OrderGoods.class);
|
|
OrderGoods orderGoods = BeanUtil.toBean(g, OrderGoods.class);
|
|
@@ -853,7 +853,7 @@ public class OrderServiceImpl extends ServiceImpl<OrderMapper, Order> implements
|
|
for (OrderGoods g : goodsList) {
|
|
for (OrderGoods g : goodsList) {
|
|
Goods goods = iGoodsService.getOne(new LambdaQueryWrapper<Goods>().eq(Goods::getGoodsId, g.getGoodsId()));
|
|
Goods goods = iGoodsService.getOne(new LambdaQueryWrapper<Goods>().eq(Goods::getGoodsId, g.getGoodsId()));
|
|
if (goods.getGoodsStatus() != 1) {
|
|
if (goods.getGoodsStatus() != 1) {
|
|
- throw new CustomException("商品尚未上架");
|
|
|
|
|
|
+ throw new CustomException(goods.getGoodsName()+"商品已下架,请重新选择商品下单");
|
|
}
|
|
}
|
|
body = "中正祥粤云-" + goods.getGoodsName();
|
|
body = "中正祥粤云-" + goods.getGoodsName();
|
|
break;
|
|
break;
|
|
@@ -969,7 +969,7 @@ public class OrderServiceImpl extends ServiceImpl<OrderMapper, Order> implements
|
|
for (OrderGoods g : goodsList) {
|
|
for (OrderGoods g : goodsList) {
|
|
Goods goods = iGoodsService.getOne(new LambdaQueryWrapper<Goods>().eq(Goods::getGoodsId, g.getGoodsId()));
|
|
Goods goods = iGoodsService.getOne(new LambdaQueryWrapper<Goods>().eq(Goods::getGoodsId, g.getGoodsId()));
|
|
if (goods.getGoodsStatus() != 1) {
|
|
if (goods.getGoodsStatus() != 1) {
|
|
- throw new CustomException("商品尚未上架");
|
|
|
|
|
|
+ throw new CustomException(goods.getGoodsName()+"商品已下架,请重新选择商品下单");
|
|
}
|
|
}
|
|
body = "中正祥粤云-" + goods.getGoodsName();
|
|
body = "中正祥粤云-" + goods.getGoodsName();
|
|
break;
|
|
break;
|