update code added
This commit is contained in:
@@ -7,12 +7,14 @@ import jakarta.persistence.Entity;
|
|||||||
import jakarta.persistence.GeneratedValue;
|
import jakarta.persistence.GeneratedValue;
|
||||||
import jakarta.persistence.GenerationType;
|
import jakarta.persistence.GenerationType;
|
||||||
import jakarta.persistence.Id;
|
import jakarta.persistence.Id;
|
||||||
|
import jakarta.persistence.Table;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import lombok.NoArgsConstructor;
|
import lombok.NoArgsConstructor;
|
||||||
import lombok.Setter;
|
import lombok.Setter;
|
||||||
import lombok.ToString;
|
import lombok.ToString;
|
||||||
|
|
||||||
@Entity
|
@Entity
|
||||||
|
@Table(name="bbps_inbound_log_trace")
|
||||||
@Getter @Setter @NoArgsConstructor @ToString
|
@Getter @Setter @NoArgsConstructor @ToString
|
||||||
public class InboundTraceLog {
|
public class InboundTraceLog {
|
||||||
|
|
||||||
|
|||||||
@@ -7,52 +7,58 @@ import jakarta.persistence.Entity;
|
|||||||
import jakarta.persistence.GeneratedValue;
|
import jakarta.persistence.GeneratedValue;
|
||||||
import jakarta.persistence.GenerationType;
|
import jakarta.persistence.GenerationType;
|
||||||
import jakarta.persistence.Id;
|
import jakarta.persistence.Id;
|
||||||
|
import jakarta.persistence.Table;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import lombok.NoArgsConstructor;
|
import lombok.NoArgsConstructor;
|
||||||
import lombok.Setter;
|
import lombok.Setter;
|
||||||
import lombok.ToString;
|
import lombok.ToString;
|
||||||
|
|
||||||
@Entity
|
@Entity
|
||||||
@Getter @Setter @NoArgsConstructor @ToString
|
@Table(name = "bbps_outbound_log_trace")
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
@NoArgsConstructor
|
||||||
|
@ToString
|
||||||
public class OutboundTraceLog {
|
public class OutboundTraceLog {
|
||||||
|
|
||||||
@Id
|
@Id
|
||||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
// 🔹 Linking fields
|
// 🔹 Linking fields
|
||||||
private String requestId; // same as inbound ka requestId
|
private String requestId; // same as inbound ka requestId
|
||||||
private String txnId; // same txnId for full trace
|
private String txnId; // same txnId for full trace
|
||||||
|
|
||||||
// 🔹 API / endpoint info
|
// 🔹 API / endpoint info
|
||||||
private String apiName; // e.g. fetchBillerData
|
private String apiName; // e.g. fetchBillerData
|
||||||
private String endpointUrl; // full URL of external API
|
private String endpointUrl; // full URL of external API
|
||||||
private String httpMethod; // GET / POST
|
private String httpMethod; // GET / POST
|
||||||
|
|
||||||
// 🔹 Request/Response payloads
|
// 🔹 Request/Response payloads
|
||||||
@Column(columnDefinition = "TEXT")
|
@Column(columnDefinition = "TEXT")
|
||||||
private String requestPayload; // jo tumne bheja external ko
|
private String requestPayload; // jo tumne bheja external ko
|
||||||
@Column(columnDefinition = "TEXT")
|
@Column(columnDefinition = "TEXT")
|
||||||
private String responsePayload; // jo external ne bheja
|
private String responsePayload; // jo external ne bheja
|
||||||
|
|
||||||
// 🔹 Response/status
|
// 🔹 Response/status
|
||||||
private String responseCode; // HTTP status code (200, 500, etc.)
|
private String responseCode; // HTTP status code (200, 500, etc.)
|
||||||
private String status; // SUCCESS / FAILED
|
private String status; // SUCCESS / FAILED
|
||||||
private LocalDateTime sendTime; // jab request gayi
|
private LocalDateTime sendTime; // jab request gayi
|
||||||
private LocalDateTime responseReceiveTime; // jab response aaya
|
private LocalDateTime responseReceiveTime; // jab response aaya
|
||||||
private LocalDateTime createdAt = LocalDateTime.now();
|
private LocalDateTime createdAt = LocalDateTime.now();
|
||||||
|
|
||||||
@Column(length = 255)
|
@Column(length = 255)
|
||||||
private String remark;
|
private String remark;
|
||||||
public OutboundTraceLog(String txnId, String requestId, String apiName,
|
|
||||||
String endpointUrl, String httpMethod, String requestPayload) {
|
public OutboundTraceLog(String txnId, String requestId, String apiName, String endpointUrl, String httpMethod,
|
||||||
this.txnId = txnId;
|
String requestPayload) {
|
||||||
this.requestId = requestId;
|
this.txnId = txnId;
|
||||||
this.apiName = apiName;
|
this.requestId = requestId;
|
||||||
this.endpointUrl = endpointUrl;
|
this.apiName = apiName;
|
||||||
this.httpMethod = httpMethod;
|
this.endpointUrl = endpointUrl;
|
||||||
this.requestPayload = requestPayload;
|
this.httpMethod = httpMethod;
|
||||||
this.sendTime = LocalDateTime.now();
|
this.requestPayload = requestPayload;
|
||||||
this.createdAt = LocalDateTime.now();
|
this.sendTime = LocalDateTime.now();
|
||||||
}
|
this.createdAt = LocalDateTime.now();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,9 +22,9 @@ swagger.server.description=Local Development Server
|
|||||||
#spring.datasource.url=jdbc:postgresql://localhost:5432/devdbuat
|
#spring.datasource.url=jdbc:postgresql://localhost:5432/devdbuat
|
||||||
spring.datasource.url=jdbc:postgresql://localhost:5432/bbps_enhanced
|
spring.datasource.url=jdbc:postgresql://localhost:5432/bbps_enhanced
|
||||||
spring.datasource.username=postgres
|
spring.datasource.username=postgres
|
||||||
#spring.datasource.password=UAT@DB_2025
|
spring.datasource.password=UAT@DB_2025
|
||||||
|
|
||||||
spring.datasource.password=himanshu@123
|
#spring.datasource.password=himanshu@123
|
||||||
spring.datasource.driver-class-name=org.postgresql.Driver
|
spring.datasource.driver-class-name=org.postgresql.Driver
|
||||||
spring.datasource.type=com.zaxxer.hikari.HikariDataSource
|
spring.datasource.type=com.zaxxer.hikari.HikariDataSource
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user