json handling service changes
This commit is contained in:
parent
788cef46cd
commit
ae80f1e0cb
|
@ -3,6 +3,7 @@ package org.opencdmp.commons;
|
|||
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import com.fasterxml.jackson.databind.ObjectReader;
|
||||
import com.fasterxml.jackson.databind.SerializationFeature;
|
||||
import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule;
|
||||
import org.springframework.beans.factory.config.ConfigurableBeanFactory;
|
||||
import org.springframework.context.annotation.Scope;
|
||||
|
@ -19,6 +20,7 @@ public class JsonHandlingService {
|
|||
public JsonHandlingService() {
|
||||
this.objectMapper = new ObjectMapper();
|
||||
this.objectMapper.registerModule(new JavaTimeModule());
|
||||
this.objectMapper.configure(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS, false);
|
||||
}
|
||||
|
||||
public String toJson(Object item) throws JsonProcessingException {
|
||||
|
|
|
@ -23,6 +23,8 @@ public class AccountingEntryCreatedIntegrationEvent extends TrackedEvent {
|
|||
|
||||
private AccountingValueType type;
|
||||
|
||||
private Double value;
|
||||
|
||||
private UUID tenant;
|
||||
|
||||
public Instant getTimeStamp() {
|
||||
|
@ -81,6 +83,14 @@ public class AccountingEntryCreatedIntegrationEvent extends TrackedEvent {
|
|||
this.type = type;
|
||||
}
|
||||
|
||||
public Double getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public void setValue(Double value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public UUID getTenant() {
|
||||
return tenant;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue