Authored by Lixiaodi

bug修改

@@ -94,7 +94,7 @@ public class ControllerCacheAop implements ApplicationContextAware{ @@ -94,7 +94,7 @@ public class ControllerCacheAop implements ApplicationContextAware{
94 try { 94 try {
95 Object level1_obj = this.cacheClient.get(level1_cache_key, returnType); 95 Object level1_obj = this.cacheClient.get(level1_cache_key, returnType);
96 if (level1_obj != null) { 96 if (level1_obj != null) {
97 - logger.debug("Cache1 hit for method:{} at key:{}.", methodName, level1_cache_key); 97 + logger.info("Cache1 hit for method:{} at key:{}.", methodName, level1_cache_key);
98 return level1_obj; 98 return level1_obj;
99 } 99 }
100 } catch (Exception e) { 100 } catch (Exception e) {
@@ -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) {