1. fix inventory-list
This commit is contained in:
2026-04-25 22:08:57 +08:00
parent 9ddfca5b77
commit 107bbb4d3b
2 changed files with 5 additions and 3 deletions

View File

@@ -177,6 +177,8 @@ public class MerchantInventoryServiceImpl extends BaseServiceImpl<MerchantInvent
@RateLimiter(value = "inventory:limiter", param = "#userId", max = 1, ttl = 10, timeUnit = TimeUnit.SECONDS) @RateLimiter(value = "inventory:limiter", param = "#userId", max = 1, ttl = 10, timeUnit = TimeUnit.SECONDS)
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public boolean unlist(Long userId, Long productId) { public boolean unlist(Long userId, Long productId) {
//todo: 检查是否有未完成的订单,考虑如有未完成的订单则不予下架
if (Objects.isNull(userId) || Objects.isNull(productId)) { if (Objects.isNull(userId) || Objects.isNull(productId)) {
throw new ServiceException("无效参数"); throw new ServiceException("无效参数");
} }