이벤트 프로세스 수정
This commit is contained in:
@@ -1,6 +1,8 @@
|
|||||||
package com.example.template;
|
package com.example.template;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
import java.text.SimpleDateFormat;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
public class OrderPlaced extends AbstractEvent{
|
public class OrderPlaced extends AbstractEvent{
|
||||||
|
|
||||||
@@ -16,6 +18,8 @@ public class OrderPlaced extends AbstractEvent{
|
|||||||
|
|
||||||
public OrderPlaced(){
|
public OrderPlaced(){
|
||||||
this.setEventType(this.getClass().getSimpleName());
|
this.setEventType(this.getClass().getSimpleName());
|
||||||
|
SimpleDateFormat defaultSimpleDateFormat = new SimpleDateFormat("YYYYMMddHHmmss");
|
||||||
|
this.timestamp = defaultSimpleDateFormat.format(new Date());
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getStateMessage() {
|
public String getStateMessage() {
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ public class ProductChanged extends AbstractEvent{
|
|||||||
private String productName;
|
private String productName;
|
||||||
private int productPrice;
|
private int productPrice;
|
||||||
private int productStock;
|
private int productStock;
|
||||||
|
private String imageUrl;
|
||||||
|
|
||||||
public Long getProductId() {
|
public Long getProductId() {
|
||||||
return productId;
|
return productId;
|
||||||
@@ -38,4 +39,12 @@ public class ProductChanged extends AbstractEvent{
|
|||||||
public void setProductStock(int productStock) {
|
public void setProductStock(int productStock) {
|
||||||
this.productStock = productStock;
|
this.productStock = productStock;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getImageUrl() {
|
||||||
|
return imageUrl;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setImageUrl(String imageUrl) {
|
||||||
|
this.imageUrl = imageUrl;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user