本文整理汇总了Java中com.ewolff.microservice.order.clients.CatalogClient类的典型用法代码示例。如果您正苦于以下问题:Java CatalogClient类的具体用法?Java CatalogClient怎么用?Java CatalogClient使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
CatalogClient类属于com.ewolff.microservice.order.clients包,在下文中一共展示了CatalogClient类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: OrderController
import com.ewolff.microservice.order.clients.CatalogClient; //导入依赖的package包/类
@Autowired
private OrderController(OrderService orderService,
OrderRepository orderRepository, CustomerClient customerClient,
CatalogClient catalogClient) {
super();
this.orderRepository = orderRepository;
this.customerClient = customerClient;
this.catalogClient = catalogClient;
this.orderService = orderService;
}
示例2: OrderService
import com.ewolff.microservice.order.clients.CatalogClient; //导入依赖的package包/类
@Autowired
private OrderService(OrderRepository orderRepository,
CustomerClient customerClient, CatalogClient itemClient) {
super();
this.orderRepository = orderRepository;
this.customerClient = customerClient;
this.itemClient = itemClient;
}
示例3: totalPrice
import com.ewolff.microservice.order.clients.CatalogClient; //导入依赖的package包/类
public double totalPrice(CatalogClient itemClient) {
return orderLine.stream()
.map((ol) -> ol.getCount() * itemClient.price(ol.getItemId()))
.reduce(0.0, (d1, d2) -> d1 + d2);
}