1. 新增商品列表和详情页库存字段
This commit is contained in:
2026-05-21 15:57:06 +08:00
parent 5c2211cdb8
commit 30fa56385c
4 changed files with 7 additions and 1 deletions

View File

@@ -26,4 +26,6 @@ public class MerchantProductApiVO implements Serializable {
private String shop;
private Integer stock;
}

View File

@@ -31,6 +31,8 @@ public class MerchantProductDetailApiVO implements Serializable {
private Integer type;
private Integer stock;
private List<Integer> payoutAccountTypes;
}

View File

@@ -47,7 +47,8 @@
unit_price as price,
unit_gift_amount as amount,
gift_type as type,
store_name as shop
store_name as shop,
stock
from
merchant_product_inventory
where is_deleted = 0

View File

@@ -378,6 +378,7 @@ public class MerchantInventoryServiceImpl extends BaseServiceImpl<MerchantInvent
vo.setType(inventory.getGiftType());
vo.setPayoutAccountTypes(payoutAccountApiVOList.stream().map(MerchantPayoutAccountApiVO::getAccountType).filter(Objects::nonNull).distinct().toList());
vo.setFavorite(favoriteService.hasFavorite(userId, inventory.getUserId()));
vo.setStock(inventory.getStock());
return vo;
}