Ver código fonte

fix: 添加日志

luofeiyun 1 semana atrás
pai
commit
9ced7912bc

+ 2 - 0
ship-module-product/ship-module-product-biz/src/main/java/com/yc/ship/module/product/api/VoyageApiImpl.java

@@ -382,6 +382,7 @@ public class VoyageApiImpl implements VoyageApi {
             voyageStockLogDO.setStockType(1);
             //判断共享库存是否充足
             if (shareNum.compareTo(totalUseNum) < 0) {
+                log.error("{}", String.format(VOYAGE_SHARE_STOCK_NOT_ENOUGH.getMsg(), shareNum, totalUseNum));
                 throw exception0(VOYAGE_SHARE_STOCK_NOT_ENOUGH.getCode(), String.format(VOYAGE_SHARE_STOCK_NOT_ENOUGH.getMsg(), shareNum, totalUseNum));
             }
             //判断航次房型楼层库存是否充足
@@ -785,6 +786,7 @@ public class VoyageApiImpl implements VoyageApi {
             voyageStockLogDO.setStockType(1);
             //判断共享库存是否充足
             if (shareNum.compareTo(totalUseNum) < 0) {
+                log.error("{}", String.format(VOYAGE_SHARE_STOCK_NOT_ENOUGH.getMsg(), shareNum, totalUseNum));
                 throw exception0(VOYAGE_SHARE_STOCK_NOT_ENOUGH.getCode(), String.format(VOYAGE_SHARE_STOCK_NOT_ENOUGH.getMsg(), shareNum, totalUseNum));
             }
             //判断航次房型楼层库存是否充足