扩展阔叶库存

时间:2015-02-05 12:35:35

标签: java broadleaf-commerce

我正在尝试了解如何扩展Broadleaf,以便可以添加多个Fulfillment位置(仓库)。我知道这可以在Broadleaf的商业版中找到,但是我买不起......: - )

我打算添加一些表,例如blc_ext_fulfilment_locations(location_id,location_name)和blc_ext_fulfilment_location_inventory(location_id,sku_id,quantity)。

问题是哪个是正确的扩展对象 - http://www.broadleafcommerce.com/docs/core/current/broadleaf-concepts/inventory中提到的InventoryServiceImpl或InventoryServiceExtensionHandler或CheckAvailabilityActivity

我假设我应该扩展InventoryServiceImpl,但是我无法在此调用 extensionManager.getProxy()。retrieveQuantitiesAvailable 中了解如何从代理实际调用DAO。

以下是相关代码:

@Service("blInventoryService")
public class InventoryServiceImpl implements ContextualInventoryService {

...

@Resource(name = "blInventoryServiceExtensionManager")
protected InventoryServiceExtensionManager extensionManager;

...

@Override
public Map<Sku, Integer> retrieveQuantitiesAvailable(Collection<Sku> skus, Map<String, Object> context) {
    ExtensionResultHolder<Map<Sku, Integer>> holder = new ExtensionResultHolder<Map<Sku, Integer>>();
    ExtensionResultStatusType res = extensionManager.getProxy().retrieveQuantitiesAvailable(skus, context, holder);
...
}
...
}

0 个答案:

没有答案