이벤트 order 이벤트 핸들링

This commit is contained in:
kimscott
2019-11-12 16:17:32 +09:00
parent d56fe4a32c
commit c3c147b097
4 changed files with 22 additions and 17 deletions

View File

@@ -19,21 +19,21 @@ public class ProductChanged extends AbstractEvent{
private String productName;
private int productPrice;
// private int productStock;
// public int getProductStock() {
// return productStock;
// }
// public void setProductStock(int productStock) {
// this.productStock = productStock;
// }
private int productStock;
public int getProductStock() {
return productStock;
}
public void setProductStock(int productStock) {
this.productStock = productStock;
}
private int stock;
public int getStock() {
return stock;
}
public void setStock(int stock) {
this.stock = stock;
}
// private int stock;
// public int getStock() {
// return stock;
// }
// public void setStock(int stock) {
// this.stock = stock;
// }
private String imageUrl;
@@ -48,8 +48,8 @@ public class ProductChanged extends AbstractEvent{
this.setProductId(product.getId());
this.setProductName(product.getName());
this.setProductPrice(product.getPrice());
// this.setProductStock(product.getStock());
this.setStock(product.getStock());
this.setProductStock(product.getStock());
// this.setStock(product.getStock());
this.setImageUrl(product.getImageUrl());
}

View File

@@ -11,8 +11,13 @@ public class ProductController {
@Autowired
ProductService productService;
// @GetMapping("/item/{productId}")
// Product productStockCheck(@PathVariable(value = "productId") Long productId) {
// return this.productService.getProductById(productId);
// }
@GetMapping("/product/{productId}")
Product productStockCheck(@PathVariable(value = "productId") Long productId) {
Product productStockCheck1(@PathVariable(value = "productId") Long productId) {
return this.productService.getProductById(productId);
}
}