From eb28221b96c6c54240046a8991865a70ebb0cb94 Mon Sep 17 00:00:00 2001 From: Mohd-Arham Date: Wed, 10 Dec 2025 12:58:20 +0530 Subject: [PATCH] update code added --- .../bbps/entites/InboundTraceLog.java | 2 + .../bbps/entites/OutboundTraceLog.java | 76 ++++++++++--------- .../resources/application-local.properties | 4 +- 3 files changed, 45 insertions(+), 37 deletions(-) diff --git a/src/main/java/com/billpaymentservice/bbps/entites/InboundTraceLog.java b/src/main/java/com/billpaymentservice/bbps/entites/InboundTraceLog.java index 15a1b3c..f3a5f3f 100644 --- a/src/main/java/com/billpaymentservice/bbps/entites/InboundTraceLog.java +++ b/src/main/java/com/billpaymentservice/bbps/entites/InboundTraceLog.java @@ -7,12 +7,14 @@ import jakarta.persistence.Entity; import jakarta.persistence.GeneratedValue; import jakarta.persistence.GenerationType; import jakarta.persistence.Id; +import jakarta.persistence.Table; import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; import lombok.ToString; @Entity +@Table(name="bbps_inbound_log_trace") @Getter @Setter @NoArgsConstructor @ToString public class InboundTraceLog { diff --git a/src/main/java/com/billpaymentservice/bbps/entites/OutboundTraceLog.java b/src/main/java/com/billpaymentservice/bbps/entites/OutboundTraceLog.java index 06a2088..ec6b4e7 100644 --- a/src/main/java/com/billpaymentservice/bbps/entites/OutboundTraceLog.java +++ b/src/main/java/com/billpaymentservice/bbps/entites/OutboundTraceLog.java @@ -7,52 +7,58 @@ import jakarta.persistence.Entity; import jakarta.persistence.GeneratedValue; import jakarta.persistence.GenerationType; import jakarta.persistence.Id; +import jakarta.persistence.Table; import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; import lombok.ToString; @Entity -@Getter @Setter @NoArgsConstructor @ToString +@Table(name = "bbps_outbound_log_trace") +@Getter +@Setter +@NoArgsConstructor +@ToString public class OutboundTraceLog { - @Id - @GeneratedValue(strategy = GenerationType.IDENTITY) - private Long id; + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + private Long id; - // 🔹 Linking fields - private String requestId; // same as inbound ka requestId - private String txnId; // same txnId for full trace + // 🔹 Linking fields + private String requestId; // same as inbound ka requestId + private String txnId; // same txnId for full trace - // 🔹 API / endpoint info - private String apiName; // e.g. fetchBillerData - private String endpointUrl; // full URL of external API - private String httpMethod; // GET / POST + // 🔹 API / endpoint info + private String apiName; // e.g. fetchBillerData + private String endpointUrl; // full URL of external API + private String httpMethod; // GET / POST - // 🔹 Request/Response payloads - @Column(columnDefinition = "TEXT") - private String requestPayload; // jo tumne bheja external ko - @Column(columnDefinition = "TEXT") - private String responsePayload; // jo external ne bheja + // 🔹 Request/Response payloads + @Column(columnDefinition = "TEXT") + private String requestPayload; // jo tumne bheja external ko + @Column(columnDefinition = "TEXT") + private String responsePayload; // jo external ne bheja - // 🔹 Response/status - private String responseCode; // HTTP status code (200, 500, etc.) - private String status; // SUCCESS / FAILED - private LocalDateTime sendTime; // jab request gayi - private LocalDateTime responseReceiveTime; // jab response aaya - private LocalDateTime createdAt = LocalDateTime.now(); + // 🔹 Response/status + private String responseCode; // HTTP status code (200, 500, etc.) + private String status; // SUCCESS / FAILED + private LocalDateTime sendTime; // jab request gayi + private LocalDateTime responseReceiveTime; // jab response aaya + private LocalDateTime createdAt = LocalDateTime.now(); - @Column(length = 255) - private String remark; - public OutboundTraceLog(String txnId, String requestId, String apiName, - String endpointUrl, String httpMethod, String requestPayload) { -this.txnId = txnId; -this.requestId = requestId; -this.apiName = apiName; -this.endpointUrl = endpointUrl; -this.httpMethod = httpMethod; -this.requestPayload = requestPayload; -this.sendTime = LocalDateTime.now(); -this.createdAt = LocalDateTime.now(); -} + @Column(length = 255) + private String remark; + + public OutboundTraceLog(String txnId, String requestId, String apiName, String endpointUrl, String httpMethod, + String requestPayload) { + this.txnId = txnId; + this.requestId = requestId; + this.apiName = apiName; + this.endpointUrl = endpointUrl; + this.httpMethod = httpMethod; + this.requestPayload = requestPayload; + this.sendTime = LocalDateTime.now(); + this.createdAt = LocalDateTime.now(); + } } diff --git a/src/main/resources/application-local.properties b/src/main/resources/application-local.properties index a5a2da9..f26da59 100644 --- a/src/main/resources/application-local.properties +++ b/src/main/resources/application-local.properties @@ -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/bbps_enhanced 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.type=com.zaxxer.hikari.HikariDataSource