update:
1. fix inventory-list
This commit is contained in:
@@ -84,7 +84,7 @@ public class MarketMerchantController {
|
||||
@ApiOperationSupport(order = 7)
|
||||
@Operation(summary = "增加库存")
|
||||
public R increaseInventory(@RequestBody @Valid IncreaseInventoryRequest request) {
|
||||
return R.status(inventoryService.increase(AuthUtil.getUserId(), request.getProductId(), request.getNum(),request.getPrice(), request.getGiftType(), request.getGiftAmount()));
|
||||
return R.status(inventoryService.increase(AuthUtil.getUserId(), request.getProductId(), request.getNum(), request.getPrice(), request.getGiftType(), request.getGiftAmount()));
|
||||
}
|
||||
|
||||
@GetMapping("/is-available")
|
||||
|
||||
@@ -177,6 +177,8 @@ public class MerchantInventoryServiceImpl extends BaseServiceImpl<MerchantInvent
|
||||
@RateLimiter(value = "inventory:limiter", param = "#userId", max = 1, ttl = 10, timeUnit = TimeUnit.SECONDS)
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public boolean unlist(Long userId, Long productId) {
|
||||
//todo: 检查是否有未完成的订单,考虑如有未完成的订单则不予下架
|
||||
|
||||
if (Objects.isNull(userId) || Objects.isNull(productId)) {
|
||||
throw new ServiceException("无效参数");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user