이벤트 프로세스 수정

This commit is contained in:
kimscott
2019-09-03 16:57:38 +09:00
parent c85b8eb9bf
commit 1e6f16eb46
2 changed files with 13 additions and 0 deletions

View File

@@ -1,6 +1,8 @@
package com.example.template;
import java.io.Serializable;
import java.text.SimpleDateFormat;
import java.util.Date;
public class OrderPlaced extends AbstractEvent{
@@ -16,6 +18,8 @@ public class OrderPlaced extends AbstractEvent{
public OrderPlaced(){
this.setEventType(this.getClass().getSimpleName());
SimpleDateFormat defaultSimpleDateFormat = new SimpleDateFormat("YYYYMMddHHmmss");
this.timestamp = defaultSimpleDateFormat.format(new Date());
}
public String getStateMessage() {

View File

@@ -6,6 +6,7 @@ public class ProductChanged extends AbstractEvent{
private String productName;
private int productPrice;
private int productStock;
private String imageUrl;
public Long getProductId() {
return productId;
@@ -38,4 +39,12 @@ public class ProductChanged extends AbstractEvent{
public void setProductStock(int productStock) {
this.productStock = productStock;
}
public String getImageUrl() {
return imageUrl;
}
public void setImageUrl(String imageUrl) {
this.imageUrl = imageUrl;
}
}