1.代客下单 库存不足提示商品名
This commit is contained in:
parent
078a986e6b
commit
48aab9eeac
|
|
@ -550,7 +550,7 @@ public class TbShopTableServiceImpl implements TbShopTableService {
|
|||
if (product.getIsDistribute() == 1) {
|
||||
if (product.getIsStock() == 1) {
|
||||
if (productMapper.decrStock(productId, decrNum) < 1) {
|
||||
throw new BadRequestException("库存不足,下单失败");
|
||||
throw new BadRequestException(product.getName() + "库存不足,下单失败");
|
||||
}
|
||||
} else {
|
||||
productMapper.decrStockUnCheck(productId, decrNum);
|
||||
|
|
@ -558,7 +558,7 @@ public class TbShopTableServiceImpl implements TbShopTableService {
|
|||
} else {
|
||||
if (product.getIsStock() == 1) {
|
||||
if (producSkutMapper.decrStock(String.valueOf(skuId), decrNum) < 1) {
|
||||
throw new BadRequestException("库存不足,下单失败");
|
||||
throw new BadRequestException(product.getName() + "库存不足,下单失败");
|
||||
}
|
||||
} else {
|
||||
producSkutMapper.decrStockUnCheck(String.valueOf(skuId), decrNum);
|
||||
|
|
|
|||
Loading…
Reference in New Issue