I have a microservice raised using Spring, RestFul and Hibernate. I would like to know how I can modify an attribute of this json microservice, based on a condition, obtained through a query to the bank.
Below, a piece of code from my Entity
.
@Entity
@Table(name = "funcoes")
@EntityListeners(AuditingEntityListener.class)
@JsonIgnoreProperties(allowGetters = true)
public class Funcoes {
@Id
@Column(name = "FUNCOD")
private String funcod;
@Column(name = "FUNFOR")
private String funfor;
@Column(name = "SISTEMA")
private String sistema;
}
}
I would like to compare the sistema
attribute, if, based on a query, I display a x
value or a y
value in my json.