|
@@ -1002,7 +1002,7 @@ public class FsStoreOrderScrmServiceImpl implements IFsStoreOrderScrmService {
|
|
|
//查询并锁定未出库溯源码带行锁
|
|
//查询并锁定未出库溯源码带行锁
|
|
|
List<FsStoreVerifyCodeScrm> availableVerifyCodes = verifyCodeMapper.selectUnOutboundVerifyCodesWithLock(productId, buyCount);
|
|
List<FsStoreVerifyCodeScrm> availableVerifyCodes = verifyCodeMapper.selectUnOutboundVerifyCodesWithLock(productId, buyCount);
|
|
|
if (availableVerifyCodes == null || availableVerifyCodes.size() < buyCount) {
|
|
if (availableVerifyCodes == null || availableVerifyCodes.size() < buyCount) {
|
|
|
- String errorMsg = String.format("商品[%s]溯源码库存不足,需%s个,仅剩余%s个",
|
|
|
|
|
|
|
+ String errorMsg = String.format("商品[%s]库存不足,需%s个,仅剩余%s个",
|
|
|
productName, buyCount, (availableVerifyCodes == null ? 0 : availableVerifyCodes.size()));
|
|
productName, buyCount, (availableVerifyCodes == null ? 0 : availableVerifyCodes.size()));
|
|
|
throw new ServiceException(errorMsg);
|
|
throw new ServiceException(errorMsg);
|
|
|
}
|
|
}
|
|
@@ -1197,7 +1197,7 @@ public class FsStoreOrderScrmServiceImpl implements IFsStoreOrderScrmService {
|
|
|
//查询并锁定未出库溯源码带行锁
|
|
//查询并锁定未出库溯源码带行锁
|
|
|
List<FsStoreVerifyCodeScrm> availableVerifyCodes = verifyCodeMapper.selectUnOutboundVerifyCodesWithLock(productId, buyCount);
|
|
List<FsStoreVerifyCodeScrm> availableVerifyCodes = verifyCodeMapper.selectUnOutboundVerifyCodesWithLock(productId, buyCount);
|
|
|
if (availableVerifyCodes == null || availableVerifyCodes.size() < buyCount) {
|
|
if (availableVerifyCodes == null || availableVerifyCodes.size() < buyCount) {
|
|
|
- String errorMsg = String.format("商品[%s]溯源码库存不足",
|
|
|
|
|
|
|
+ String errorMsg = String.format("商品[%s]库存不足",
|
|
|
productName, buyCount, (availableVerifyCodes == null ? 0 : availableVerifyCodes.size()));
|
|
productName, buyCount, (availableVerifyCodes == null ? 0 : availableVerifyCodes.size()));
|
|
|
throw new ServiceException(errorMsg);
|
|
throw new ServiceException(errorMsg);
|
|
|
}
|
|
}
|
|
@@ -5137,7 +5137,7 @@ public class FsStoreOrderScrmServiceImpl implements IFsStoreOrderScrmService {
|
|
|
//查询并锁定未出库溯源码带行锁
|
|
//查询并锁定未出库溯源码带行锁
|
|
|
List<FsStoreVerifyCodeScrm> availableVerifyCodes = verifyCodeMapper.selectUnOutboundVerifyCodesWithLock(productId, buyCount);
|
|
List<FsStoreVerifyCodeScrm> availableVerifyCodes = verifyCodeMapper.selectUnOutboundVerifyCodesWithLock(productId, buyCount);
|
|
|
if (availableVerifyCodes == null || availableVerifyCodes.size() < buyCount) {
|
|
if (availableVerifyCodes == null || availableVerifyCodes.size() < buyCount) {
|
|
|
- String errorMsg = String.format("商品[%s]溯源码库存不足",
|
|
|
|
|
|
|
+ String errorMsg = String.format("商品[%s]库存不足",
|
|
|
productName, buyCount, (availableVerifyCodes == null ? 0 : availableVerifyCodes.size()));
|
|
productName, buyCount, (availableVerifyCodes == null ? 0 : availableVerifyCodes.size()));
|
|
|
throw new ServiceException(errorMsg);
|
|
throw new ServiceException(errorMsg);
|
|
|
}
|
|
}
|