feat:
1. 新增商品列表和详情页库存字段
This commit is contained in:
@@ -26,4 +26,6 @@ public class MerchantProductApiVO implements Serializable {
|
||||
|
||||
private String shop;
|
||||
|
||||
private Integer stock;
|
||||
|
||||
}
|
||||
|
||||
@@ -31,6 +31,8 @@ public class MerchantProductDetailApiVO implements Serializable {
|
||||
|
||||
private Integer type;
|
||||
|
||||
private Integer stock;
|
||||
|
||||
private List<Integer> payoutAccountTypes;
|
||||
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user