|
@@ -243,11 +243,16 @@ public class ProductServiceImpl implements ProductService{ |
|
@@ -243,11 +243,16 @@ public class ProductServiceImpl implements ProductService{ |
243
|
StoragePrice sp = storagePriceMapper.selectBySkup(skup);
|
243
|
StoragePrice sp = storagePriceMapper.selectBySkup(skup);
|
244
|
storageId = sp.getStorageId();
|
244
|
storageId = sp.getStorageId();
|
245
|
if (sp == null || (storageId = sp.getStorageId()) == null) {
|
245
|
if (sp == null || (storageId = sp.getStorageId()) == null) {
|
246
|
- LOGGER.error("addStorageNum skup={}, storageId={}, num={}, find storageId is null", skup, storageId,
|
|
|
247
|
- num);
|
246
|
+ LOGGER.error("修改库存:StoragePrice表无数据或者StorageId为空, skup={}, storageId={}, num={}, find storageId is null",
|
|
|
247
|
+ skup, storageId, num);
|
|
|
248
|
+ return;
|
248
|
}
|
249
|
}
|
249
|
}
|
250
|
}
|
250
|
- storageMapper.addStorageNum(storageId, num);
|
251
|
+ try {
|
|
|
252
|
+ storageMapper.addStorageNum(storageId, num);
|
|
|
253
|
+ } catch (Exception e) {
|
|
|
254
|
+ LOGGER.error("修改库存出错: skup=" + skup + ", storageId=" + storageId + ", num=" + num + ", find storageId is null", e);
|
|
|
255
|
+ }
|
251
|
}
|
256
|
}
|
252
|
|
257
|
|
253
|
private StoragePrice checkSkupCanSale(Integer skup) {
|
258
|
private StoragePrice checkSkupCanSale(Integer skup) {
|