Commit acc75310163fdc6b5bf481adfc14012ff41a02f2
1 parent
922a0a8d
Update exception message in StockAddRequest.java
将库存数量的异常信息修改为中文,更符合本地化需求。这样可以提高代码的可读性和使用者的友好度。
Showing
1 changed file
with
1 additions
and
1 deletions
etrade-shop/src/main/java/com/diligrp/etrade/shop/domain/request/StockAddRequest.java
... | ... | @@ -42,7 +42,7 @@ public record StockAddRequest(String businessCode, BigDecimal stock, Long produc |
42 | 42 | } |
43 | 43 | } |
44 | 44 | if (stock == null || stock.compareTo(BigDecimal.ZERO) <= 0) { |
45 | - throw new IllegalArgumentException("stock cannot be null or negative"); | |
45 | + throw new IllegalArgumentException("库存数量不正确"); | |
46 | 46 | } |
47 | 47 | if (productId == null) { |
48 | 48 | throw new IllegalArgumentException("productId cannot be null"); | ... | ... |