04-12-25
This commit is contained in:
@@ -71,7 +71,7 @@ public class ComplainController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/viewAllComplaints")
|
@PostMapping("/viewAllComplaints")
|
||||||
public ResponseEntity<ResponseModel> viewAllComplaints(@RequestBody ViewAllComplaintsTicketsRequest request) {
|
public ResponseEntity<ResponseModel> viewAllComplaints(@Validated @RequestBody ViewAllComplaintsTicketsRequest request) {
|
||||||
log.info("Received request complaint View All Complaints for Status Type={}", request.getStatusType());
|
log.info("Received request complaint View All Complaints for Status Type={}", request.getStatusType());
|
||||||
ResponseModel response = complainService.ViewAllComplaints(request);
|
ResponseModel response = complainService.ViewAllComplaints(request);
|
||||||
return ResponseEntity.ok(response);
|
return ResponseEntity.ok(response);
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package com.billpaymentservice.bbps.dto;
|
package com.billpaymentservice.bbps.dto;
|
||||||
|
|
||||||
|
import jakarta.validation.constraints.NotBlank;
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import lombok.NoArgsConstructor;
|
import lombok.NoArgsConstructor;
|
||||||
@@ -10,6 +11,7 @@ import lombok.Setter;
|
|||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
@NoArgsConstructor
|
@NoArgsConstructor
|
||||||
public class Tag {
|
public class Tag {
|
||||||
private String name;
|
|
||||||
private String value;
|
private String name;
|
||||||
|
private String value;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
package com.billpaymentservice.bbps.dto.request;
|
package com.billpaymentservice.bbps.dto.request;
|
||||||
|
|
||||||
import jakarta.validation.constraints.NotNull;
|
import jakarta.validation.constraints.NotBlank;
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import lombok.NoArgsConstructor;
|
import lombok.NoArgsConstructor;
|
||||||
@@ -12,7 +12,7 @@ import lombok.Setter;
|
|||||||
@NoArgsConstructor
|
@NoArgsConstructor
|
||||||
public class BillFetchByBillIdRequest extends BaseClass {
|
public class BillFetchByBillIdRequest extends BaseClass {
|
||||||
|
|
||||||
@NotNull
|
@NotBlank(message = "bill id not be null")
|
||||||
private String billId;
|
private String billId;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,9 @@
|
|||||||
package com.billpaymentservice.bbps.dto.request;
|
package com.billpaymentservice.bbps.dto.request;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import jakarta.validation.constraints.NotBlank;
|
||||||
|
import jakarta.validation.constraints.NotNull;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import lombok.Setter;
|
import lombok.Setter;
|
||||||
|
|
||||||
@@ -8,25 +11,47 @@ import lombok.Setter;
|
|||||||
@Setter
|
@Setter
|
||||||
public class BillPaymentRequest extends BaseClass {
|
public class BillPaymentRequest extends BaseClass {
|
||||||
|
|
||||||
private String tenantId;
|
@NotBlank(message = "ref id cannot be null or empty")
|
||||||
private String refId;
|
private String refId;
|
||||||
private String billId;
|
|
||||||
private boolean amountOptions;
|
|
||||||
private String paymentMode;
|
|
||||||
private String paymentInformation;
|
|
||||||
private String billerId;
|
|
||||||
private String billerName;
|
|
||||||
private String billerCategory;
|
|
||||||
private String macAdress;
|
|
||||||
private String customerMobNo;
|
|
||||||
private Integer txnAmount;
|
|
||||||
private String paymentRefId;
|
|
||||||
private String clientReqId;
|
|
||||||
private String paymentChannel;
|
|
||||||
|
|
||||||
private List<DeviceBlockTagRequest> deviceBlockTags;
|
@NotBlank(message = "bill id cannot be null or empty")
|
||||||
private List<CustomerParamTagRequest> customerParamsRequest;
|
private String billId;
|
||||||
private List<RemitterIdentityRequest> remitterIdentity;
|
|
||||||
private List<AmountBreakRequest> amountBreakSet;
|
// Change the field to Boolean (wrapper) type to allow @NotNull validation
|
||||||
|
@NotNull(message = "Amount options cannot be null.")
|
||||||
|
private boolean amountOptions; // Changed to Boolean (wrapper type)
|
||||||
|
|
||||||
|
@NotBlank(message = "payment mode cannot be null or empty")
|
||||||
|
private String paymentMode;
|
||||||
|
|
||||||
|
@NotBlank(message = "payment information cannot be null or empty")
|
||||||
|
private String paymentInformation;
|
||||||
|
|
||||||
|
@NotBlank(message = "biller id cannot be null or empty")
|
||||||
|
private String billerId;
|
||||||
|
|
||||||
|
@NotBlank(message = "biller name cannot be null or empty")
|
||||||
|
private String billerName;
|
||||||
|
|
||||||
|
@NotBlank(message = "biller category cannot be null or empty")
|
||||||
|
private String billerCategory;
|
||||||
|
|
||||||
|
private String macAdress;
|
||||||
|
|
||||||
|
private String customerMobNo;
|
||||||
|
|
||||||
|
@NotNull(message = "Transaction amount cannot be null.")
|
||||||
|
private Integer txnAmount; // Changed to @NotNull as it's an Integer (non-nullable)
|
||||||
|
|
||||||
|
private String paymentRefId;
|
||||||
|
|
||||||
|
private String clientReqId;
|
||||||
|
|
||||||
|
@NotBlank(message = "payment channel cannot be null or empty")
|
||||||
|
private String paymentChannel;
|
||||||
|
|
||||||
|
private List<DeviceBlockTagRequest> deviceBlockTags;
|
||||||
|
private List<CustomerParamTagRequest> customerParamsRequest;
|
||||||
|
private List<RemitterIdentityRequest> remitterIdentity;
|
||||||
|
private List<AmountBreakRequest> amountBreakSet;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package com.billpaymentservice.bbps.dto.request;
|
package com.billpaymentservice.bbps.dto.request;
|
||||||
|
|
||||||
|
import jakarta.validation.constraints.NotBlank;
|
||||||
import jakarta.validation.constraints.NotNull;
|
import jakarta.validation.constraints.NotNull;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import lombok.Setter;
|
import lombok.Setter;
|
||||||
@@ -10,7 +11,7 @@ import lombok.ToString;
|
|||||||
@ToString(callSuper = true)
|
@ToString(callSuper = true)
|
||||||
public class BillerDetailRequest extends BaseClass{
|
public class BillerDetailRequest extends BaseClass{
|
||||||
|
|
||||||
@NotNull
|
@NotBlank(message = "biller id not be null")
|
||||||
private String billerId;
|
private String billerId;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
package com.billpaymentservice.bbps.dto.request;
|
package com.billpaymentservice.bbps.dto.request;
|
||||||
|
|
||||||
import jakarta.validation.constraints.NotNull;
|
import jakarta.validation.constraints.NotBlank;
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import lombok.NoArgsConstructor;
|
import lombok.NoArgsConstructor;
|
||||||
@@ -14,6 +14,6 @@ import lombok.ToString;
|
|||||||
@ToString
|
@ToString
|
||||||
public class CustomParamRequest extends BaseClass {
|
public class CustomParamRequest extends BaseClass {
|
||||||
|
|
||||||
@NotNull
|
@NotBlank(message = "biller id not be null")
|
||||||
private String billerId;
|
private String billerId;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,11 +6,13 @@ import com.billpaymentservice.bbps.dto.CustomerParamsRequest;
|
|||||||
import com.billpaymentservice.bbps.dto.RemitterIdentity;
|
import com.billpaymentservice.bbps.dto.RemitterIdentity;
|
||||||
import com.billpaymentservice.bbps.dto.Tag;
|
import com.billpaymentservice.bbps.dto.Tag;
|
||||||
|
|
||||||
|
import jakarta.validation.constraints.NotBlank;
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import lombok.NoArgsConstructor;
|
import lombok.NoArgsConstructor;
|
||||||
import lombok.Setter;
|
import lombok.Setter;
|
||||||
import lombok.ToString;
|
import lombok.ToString;
|
||||||
|
|
||||||
@Getter
|
@Getter
|
||||||
@Setter
|
@Setter
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
@@ -18,19 +20,29 @@ import lombok.ToString;
|
|||||||
@ToString
|
@ToString
|
||||||
public class FetchBillRequest extends BaseClass {
|
public class FetchBillRequest extends BaseClass {
|
||||||
|
|
||||||
// private String tenantId; // M
|
@NotBlank(message = "biller id not be null")
|
||||||
private String billerId; // M
|
private String billerId;
|
||||||
private String billerName; //M
|
|
||||||
// private String digiledgeKey; // M
|
@NotBlank(message = "biller name not be null")
|
||||||
// private String agentId; // M
|
private String billerName;
|
||||||
private String billerCategory; // M
|
|
||||||
private String clientReqId; // C
|
@NotBlank(message = "biller category not be null")
|
||||||
private String macAdress; // C
|
private String billerCategory;
|
||||||
private String customerMobNo; // M
|
|
||||||
private String remitterName; // O
|
private String clientReqId;
|
||||||
private String paymentChannel; // M
|
private String macAdress;
|
||||||
private List<Tag> deviceBlockTags; // M
|
|
||||||
private CustomerParamsRequest customerParamsRequest; // M
|
@NotBlank(message = "customer mob no not be null")
|
||||||
private List<RemitterIdentity> remitterIdentity; // O
|
private String customerMobNo;
|
||||||
|
|
||||||
|
private String remitterName;
|
||||||
|
|
||||||
|
@NotBlank(message = "payment channel not be null")
|
||||||
|
private String paymentChannel;
|
||||||
|
|
||||||
|
private List<Tag> deviceBlockTags;
|
||||||
|
|
||||||
|
private CustomerParamsRequest customerParamsRequest;
|
||||||
|
private List<RemitterIdentity> remitterIdentity;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
+11
-10
@@ -2,6 +2,7 @@ package com.billpaymentservice.bbps.dto.request;
|
|||||||
|
|
||||||
import com.billpaymentservice.bbps.dto.CustomerParamsRequest;
|
import com.billpaymentservice.bbps.dto.CustomerParamsRequest;
|
||||||
|
|
||||||
|
import jakarta.validation.constraints.NotBlank;
|
||||||
import jakarta.validation.constraints.NotNull;
|
import jakarta.validation.constraints.NotNull;
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
@@ -14,18 +15,18 @@ import lombok.Setter;
|
|||||||
@NoArgsConstructor
|
@NoArgsConstructor
|
||||||
public class FetchBillValidatestRequest extends BaseClass {
|
public class FetchBillValidatestRequest extends BaseClass {
|
||||||
|
|
||||||
@NotNull
|
@NotBlank(message = "biller id not be null")
|
||||||
private String billerId; // Alphanumeric, Unique ID assigned by NPCI
|
private String billerId;
|
||||||
@NotNull
|
@NotBlank(message = "biller name not be null")
|
||||||
private String billerName; // String, Name of the biller
|
private String billerName;
|
||||||
@NotNull
|
@NotBlank(message = "biller category not be null")
|
||||||
private String billerCategory; // String, CategoryResponseList of the biller
|
private String billerCategory;
|
||||||
@NotNull
|
@NotBlank(message = "biller mob no not be null")
|
||||||
private String customerMobNo; // String, Mobile of the Customer
|
private String customerMobNo;
|
||||||
private String clientReqId;
|
private String clientReqId;
|
||||||
|
|
||||||
// Optional Fields
|
// Optional Fields
|
||||||
private String macAddress; // Alphanumeric MAC Address of the Agent Server
|
private String macAddress;
|
||||||
//private String clientReqId; // String, Unique id provided by the client
|
// private String clientReqId;
|
||||||
private CustomerParamsRequest customerParamsRequest; // Customer parameters for identifying the bill
|
private CustomerParamsRequest customerParamsRequest; // Customer parameters for identifying the bill
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
package com.billpaymentservice.bbps.dto.request;
|
package com.billpaymentservice.bbps.dto.request;
|
||||||
|
|
||||||
import jakarta.validation.constraints.Min;
|
import jakarta.validation.constraints.Min;
|
||||||
|
import jakarta.validation.constraints.NotBlank;
|
||||||
import jakarta.validation.constraints.NotNull;
|
import jakarta.validation.constraints.NotNull;
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
@@ -15,7 +16,7 @@ public class MasterCategoryRequest extends BaseClass {
|
|||||||
|
|
||||||
private String billerName;
|
private String billerName;
|
||||||
|
|
||||||
@NotNull
|
@NotBlank(message = "category name not be null")
|
||||||
private String category;
|
private String category;
|
||||||
|
|
||||||
private Integer pageNo = 0;
|
private Integer pageNo = 0;
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
package com.billpaymentservice.bbps.dto.request;
|
package com.billpaymentservice.bbps.dto.request;
|
||||||
|
|
||||||
|
import jakarta.validation.constraints.Min;
|
||||||
import jakarta.validation.constraints.NotBlank;
|
import jakarta.validation.constraints.NotBlank;
|
||||||
|
import jakarta.validation.constraints.NotNull;
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import lombok.NoArgsConstructor;
|
import lombok.NoArgsConstructor;
|
||||||
@@ -26,8 +28,9 @@ public class PlanRequest extends BaseClass {
|
|||||||
|
|
||||||
private String circle;
|
private String circle;
|
||||||
|
|
||||||
// ✅ Optional pagination parameters
|
private Integer page = 0;
|
||||||
private Integer page;
|
|
||||||
|
|
||||||
|
@NotNull(message = "pageEnd is required")
|
||||||
|
@Min(value = 1, message = "pageEnd must be greater than 0")
|
||||||
private Integer pagesize;
|
private Integer pagesize;
|
||||||
}
|
}
|
||||||
|
|||||||
+6
-3
@@ -1,15 +1,18 @@
|
|||||||
package com.billpaymentservice.bbps.dto.request;
|
package com.billpaymentservice.bbps.dto.request;
|
||||||
|
|
||||||
|
import jakarta.validation.constraints.Min;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import lombok.Setter;
|
import lombok.Setter;
|
||||||
|
|
||||||
@Getter
|
@Getter
|
||||||
@Setter
|
@Setter
|
||||||
public class ViewAllComplaintsTicketsRequest extends BaseClass{
|
public class ViewAllComplaintsTicketsRequest extends BaseClass {
|
||||||
|
|
||||||
private String statusType; // e.g. COMPLAINT_OPEN_SUCCESS
|
private String statusType; // e.g. COMPLAINT_OPEN_SUCCESS
|
||||||
private Integer pageNo; // default 0
|
@Min(value = 0, message = "Page number must be a non-negative integer.")
|
||||||
private Integer pageSize; // default 10
|
private Integer pageNo;
|
||||||
|
@Min(value = 1, message = "Page size must be at least 1.")
|
||||||
|
private Integer pageSize;
|
||||||
private String ticketType; // default 10
|
private String ticketType; // default 10
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -59,6 +59,9 @@ public class BillerCategoryWise extends Auditable<String> {
|
|||||||
@Column(name = "txn_id")
|
@Column(name = "txn_id")
|
||||||
private String txnId;
|
private String txnId;
|
||||||
|
|
||||||
|
@Column(name = "user_id")
|
||||||
|
private String userId;
|
||||||
|
|
||||||
// One-to-One mapping with icon
|
// One-to-One mapping with icon
|
||||||
@OneToOne(mappedBy = "biller", cascade = CascadeType.ALL, orphanRemoval = true, fetch = FetchType.LAZY)
|
@OneToOne(mappedBy = "biller", cascade = CascadeType.ALL, orphanRemoval = true, fetch = FetchType.LAZY)
|
||||||
private BillerCategoryIcon icon;
|
private BillerCategoryIcon icon;
|
||||||
|
|||||||
@@ -33,4 +33,7 @@ public class ContactMasterData extends Auditable<String> {
|
|||||||
|
|
||||||
@Column(name = "txn_id")
|
@Column(name = "txn_id")
|
||||||
private String txnId;
|
private String txnId;
|
||||||
|
|
||||||
|
@Column(name = "user_id")
|
||||||
|
private String userId;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
package com.billpaymentservice.bbps.entites;
|
package com.billpaymentservice.bbps.entites;
|
||||||
|
|
||||||
|
import com.billpaymentservice.bbps.audit.Auditable;
|
||||||
|
|
||||||
import jakarta.persistence.Column;
|
import jakarta.persistence.Column;
|
||||||
import jakarta.persistence.Entity;
|
import jakarta.persistence.Entity;
|
||||||
import jakarta.persistence.GeneratedValue;
|
import jakarta.persistence.GeneratedValue;
|
||||||
@@ -15,32 +17,40 @@ import lombok.ToString;
|
|||||||
@Entity
|
@Entity
|
||||||
@ToString
|
@ToString
|
||||||
@Table(name = "custom_param")
|
@Table(name = "custom_param")
|
||||||
public class CustomParam {
|
public class CustomParam extends Auditable<String> {
|
||||||
|
|
||||||
@Id
|
@Id
|
||||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
@Column(name = "custom_param_name")
|
@Column(name = "custom_param_name")
|
||||||
private String customParamName;
|
private String customParamName;
|
||||||
|
|
||||||
@Column(name = "data_type")
|
@Column(name = "data_type")
|
||||||
private String dataType;
|
private String dataType;
|
||||||
|
|
||||||
@Column(name = "optional")
|
@Column(name = "optional")
|
||||||
private Boolean optional;
|
private Boolean optional;
|
||||||
|
|
||||||
@Column(name = "min_length")
|
@Column(name = "min_length")
|
||||||
private Integer minLength;
|
private Integer minLength;
|
||||||
|
|
||||||
@Column(name = "max_length")
|
@Column(name = "max_length")
|
||||||
private Integer maxLength;
|
private Integer maxLength;
|
||||||
|
|
||||||
@Column(name = "regex")
|
@Column(name = "regex")
|
||||||
private String regex;
|
private String regex;
|
||||||
|
|
||||||
@Column(name = "visibility")
|
@Column(name = "visibility")
|
||||||
private Boolean visibility;
|
private Boolean visibility;
|
||||||
|
|
||||||
|
@Column(name = "req_id")
|
||||||
|
private String reqId;
|
||||||
|
|
||||||
|
@Column(name = "txn_id")
|
||||||
|
private String txnId;
|
||||||
|
|
||||||
|
@Column(name = "user_id")
|
||||||
|
private String userId;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -164,6 +164,7 @@ public class AgentServiceImpl implements AgentService {
|
|||||||
String txnId = helper.generateTxnId(15);
|
String txnId = helper.generateTxnId(15);
|
||||||
String reqId = billFetchByBillIdRequest.getReqId();
|
String reqId = billFetchByBillIdRequest.getReqId();
|
||||||
String billId = billFetchByBillIdRequest.getBillId();
|
String billId = billFetchByBillIdRequest.getBillId();
|
||||||
|
String userId = billFetchByBillIdRequest.getClientUserId();
|
||||||
String fullUrl = agentDtaUrl + BBPSConstant.BILL_FETCH_BY_ID + billFetchByBillIdRequest.getBillId();
|
String fullUrl = agentDtaUrl + BBPSConstant.BILL_FETCH_BY_ID + billFetchByBillIdRequest.getBillId();
|
||||||
OutboundTraceLog outboundLog = helper.createOutboundLog(txnId, reqId, apiName, fullUrl, BBPSConstant.HTTP_GET,
|
OutboundTraceLog outboundLog = helper.createOutboundLog(txnId, reqId, apiName, fullUrl, BBPSConstant.HTTP_GET,
|
||||||
null);
|
null);
|
||||||
@@ -197,7 +198,7 @@ public class AgentServiceImpl implements AgentService {
|
|||||||
LOGGER.info("Current Bill Status: {}", status);
|
LOGGER.info("Current Bill Status: {}", status);
|
||||||
|
|
||||||
helper.updateInboundLogSuccess(inboundLog, responseData, generalResp.getStatus());
|
helper.updateInboundLogSuccess(inboundLog, responseData, generalResp.getStatus());
|
||||||
mapperHelper.saveOrUpdateBillData(responseWrapper, billFetchByBillIdRequest, txnId);
|
mapperHelper.saveOrUpdateBillData(responseWrapper, billFetchByBillIdRequest, txnId, reqId, userId);
|
||||||
LOGGER.info("Bill data saved successfully for billId: {}", billId);
|
LOGGER.info("Bill data saved successfully for billId: {}", billId);
|
||||||
|
|
||||||
return new ResponseModel(generalResp.getMessage(), generalResp.getStatus(),
|
return new ResponseModel(generalResp.getMessage(), generalResp.getStatus(),
|
||||||
@@ -216,8 +217,9 @@ public class AgentServiceImpl implements AgentService {
|
|||||||
String reqId = billFetchByBillIdRequest.getReqId();
|
String reqId = billFetchByBillIdRequest.getReqId();
|
||||||
String billId = billFetchByBillIdRequest.getBillId();
|
String billId = billFetchByBillIdRequest.getBillId();
|
||||||
String mid = billFetchByBillIdRequest.getMid();
|
String mid = billFetchByBillIdRequest.getMid();
|
||||||
|
String userId = billFetchByBillIdRequest.getClientUserId();
|
||||||
String requestJson = helper.convertObjectToJson(billFetchByBillIdRequest);
|
String requestJson = helper.convertObjectToJson(billFetchByBillIdRequest);
|
||||||
LOGGER.info("[{}] START | reqId={} | mid={} | billId={}", apiName, reqId, mid, billId);
|
LOGGER.info("[{}] START | reqId={} | mid={} | billId={} | userId={}", apiName, reqId, mid, billId, userId);
|
||||||
String fullUrl = agentDtaUrl + BBPSConstant.BILL_FETCH_BY_ID + billFetchByBillIdRequest.getBillId();
|
String fullUrl = agentDtaUrl + BBPSConstant.BILL_FETCH_BY_ID + billFetchByBillIdRequest.getBillId();
|
||||||
String txnId = helper.generateTxnId(15);
|
String txnId = helper.generateTxnId(15);
|
||||||
InboundTraceLog inboundLog = helper.createInboundLog(reqId, txnId, apiName, billFetchByBillIdRequest.getMid(),
|
InboundTraceLog inboundLog = helper.createInboundLog(reqId, txnId, apiName, billFetchByBillIdRequest.getMid(),
|
||||||
@@ -253,7 +255,7 @@ public class AgentServiceImpl implements AgentService {
|
|||||||
|
|
||||||
// update inbound log success and persist bill data
|
// update inbound log success and persist bill data
|
||||||
helper.updateInboundLogSuccess(inboundLog, responseData, generalResp.getStatus());
|
helper.updateInboundLogSuccess(inboundLog, responseData, generalResp.getStatus());
|
||||||
mapperHelper.saveOrUpdateBillData(responseWrapper, billFetchByBillIdRequest, txnId);
|
mapperHelper.saveOrUpdateBillData(responseWrapper, billFetchByBillIdRequest, txnId, reqId, userId);
|
||||||
LOGGER.info("Bill data saved successfully for billId={} | Status={}", billId, generalResp.getStatus());
|
LOGGER.info("Bill data saved successfully for billId={} | Status={}", billId, generalResp.getStatus());
|
||||||
LOGGER.info("[{}] END | reqId={} | status={}", apiName, reqId, generalResp.getStatus());
|
LOGGER.info("[{}] END | reqId={} | status={}", apiName, reqId, generalResp.getStatus());
|
||||||
return responseModel;
|
return responseModel;
|
||||||
@@ -396,7 +398,7 @@ public class AgentServiceImpl implements AgentService {
|
|||||||
|
|
||||||
helper.updateInboundLogSuccess(inboundLog, responseData, generalResp.getStatus());
|
helper.updateInboundLogSuccess(inboundLog, responseData, generalResp.getStatus());
|
||||||
System.out.println("responseWrapper:" + responseWrapper);
|
System.out.println("responseWrapper:" + responseWrapper);
|
||||||
mapperHelper.saveBillValidation(responseWrapper, billRequest,txnId);
|
mapperHelper.saveBillValidation(responseWrapper, billRequest, txnId);
|
||||||
return new ResponseModel(generalResp.getMessage(), generalResp.getStatus(),
|
return new ResponseModel(generalResp.getMessage(), generalResp.getStatus(),
|
||||||
Integer.parseInt(generalResp.getStatusCode()), responseWrapper);
|
Integer.parseInt(generalResp.getStatusCode()), responseWrapper);
|
||||||
} catch (JsonProcessingException e) {
|
} catch (JsonProcessingException e) {
|
||||||
@@ -454,7 +456,7 @@ public class AgentServiceImpl implements AgentService {
|
|||||||
GeneralResp generalResp = responseWrapper.getGenericResponse();
|
GeneralResp generalResp = responseWrapper.getGenericResponse();
|
||||||
|
|
||||||
helper.updateInboundLogSuccess(inboundLog, responseData, generalResp.getStatus());
|
helper.updateInboundLogSuccess(inboundLog, responseData, generalResp.getStatus());
|
||||||
mapperHelper.saveBillValidation(responseWrapper, billRequest,txnId);
|
mapperHelper.saveBillValidation(responseWrapper, billRequest, txnId);
|
||||||
LOGGER.info("Bill validation saved successfully for billId: {}", billId);
|
LOGGER.info("Bill validation saved successfully for billId: {}", billId);
|
||||||
LOGGER.info("[{}] END | reqId={} | status={}", apiName, reqId, generalResp.getStatus());
|
LOGGER.info("[{}] END | reqId={} | status={}", apiName, reqId, generalResp.getStatus());
|
||||||
return new ResponseModel(generalResp.getMessage(), generalResp.getStatus(),
|
return new ResponseModel(generalResp.getMessage(), generalResp.getStatus(),
|
||||||
|
|||||||
@@ -239,9 +239,9 @@ public class MasterDataServiceImpl implements MasterDataService {
|
|||||||
String apiName = BBPSConstant.API_GET_CUSTOMER_PARAM_BY_BILLER_ID;
|
String apiName = BBPSConstant.API_GET_CUSTOMER_PARAM_BY_BILLER_ID;
|
||||||
String requestId = customerParamRequest.getReqId();
|
String requestId = customerParamRequest.getReqId();
|
||||||
String mid = customerParamRequest.getMid();
|
String mid = customerParamRequest.getMid();
|
||||||
|
String userId = customerParamRequest.getClientUserId();
|
||||||
LOGGER.info("[{}] START | reqId={} | mid={} | billerId={}", apiName, requestId, mid,
|
LOGGER.info("[{}] START | reqId={} | mid={} | billerId={} | userId={}", apiName, requestId, mid,
|
||||||
customerParamRequest.getBillerId());
|
customerParamRequest.getBillerId(), userId);
|
||||||
String txnID = helper.generateTxnId(15);
|
String txnID = helper.generateTxnId(15);
|
||||||
String billerId = customerParamRequest.getBillerId();
|
String billerId = customerParamRequest.getBillerId();
|
||||||
String fullUrl = masterRegisterUrl + BBPSConstant.CUSTOMPARAM_URL + billerId;
|
String fullUrl = masterRegisterUrl + BBPSConstant.CUSTOMPARAM_URL + billerId;
|
||||||
@@ -282,8 +282,13 @@ public class MasterDataServiceImpl implements MasterDataService {
|
|||||||
mapper.getConfiguration().setMatchingStrategy(MatchingStrategies.STRICT);
|
mapper.getConfiguration().setMatchingStrategy(MatchingStrategies.STRICT);
|
||||||
|
|
||||||
// Map DTOs to entities
|
// Map DTOs to entities
|
||||||
List<CustomParam> entities = customParams.stream().map(dto -> mapper.map(dto, CustomParam.class))
|
List<CustomParam> entities = customParams.stream().map(dto -> {
|
||||||
.collect(Collectors.toList());
|
CustomParam mappedParam = mapper.map(dto, CustomParam.class);
|
||||||
|
mappedParam.setReqId(requestId);
|
||||||
|
mappedParam.setTxnId(txnID);
|
||||||
|
mappedParam.setUserId(userId);
|
||||||
|
return mappedParam;
|
||||||
|
}).collect(Collectors.toList());
|
||||||
// Save all to DB
|
// Save all to DB
|
||||||
customParamReposiotory.saveAll(entities);
|
customParamReposiotory.saveAll(entities);
|
||||||
LOGGER.info("[{}] Saved {} custom param records to DB", apiName, entities.size());
|
LOGGER.info("[{}] Saved {} custom param records to DB", apiName, entities.size());
|
||||||
@@ -306,8 +311,9 @@ public class MasterDataServiceImpl implements MasterDataService {
|
|||||||
String apiName = BBPSConstant.API_FETCH_CATEGORY_MASTER_DATA;
|
String apiName = BBPSConstant.API_FETCH_CATEGORY_MASTER_DATA;
|
||||||
String requestId = contactMasterRequest.getReqId();
|
String requestId = contactMasterRequest.getReqId();
|
||||||
String mid = contactMasterRequest.getMid();
|
String mid = contactMasterRequest.getMid();
|
||||||
LOGGER.info("[{}] START | reqId={} | mid={} | category={}", apiName, requestId, contactMasterRequest.getMid(),
|
String userId = contactMasterRequest.getClientUserId();
|
||||||
contactMasterRequest.getCategory());
|
LOGGER.info("[{}] START | reqId={} | mid={} | category={} | userId={}", apiName, requestId,
|
||||||
|
contactMasterRequest.getMid(), contactMasterRequest.getCategory(), userId);
|
||||||
String txnID = helper.generateTxnId(15);
|
String txnID = helper.generateTxnId(15);
|
||||||
|
|
||||||
BharatConnectMaster headersData = beneficiaryDetailsRepository.findByOrgId(BBPSConstant.ORG_ID);
|
BharatConnectMaster headersData = beneficiaryDetailsRepository.findByOrgId(BBPSConstant.ORG_ID);
|
||||||
@@ -345,8 +351,8 @@ public class MasterDataServiceImpl implements MasterDataService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ContactMasterResponse responseWrapper = objectMapper.convertValue(dataMap, ContactMasterResponse.class);
|
ContactMasterResponse responseWrapper = objectMapper.convertValue(dataMap, ContactMasterResponse.class);
|
||||||
String result = mapperHelper.saveContactMasterData(responseWrapper.getContactMasterList(), requestId,
|
String result = mapperHelper.saveContactMasterData(responseWrapper.getContactMasterList(), requestId, txnID,
|
||||||
txnID);
|
userId);
|
||||||
|
|
||||||
LOGGER.info("[{}] DB Save Result | reqId={} | result={}", apiName, requestId, result);
|
LOGGER.info("[{}] DB Save Result | reqId={} | result={}", apiName, requestId, result);
|
||||||
GeneralResp generalResp = responseWrapper.getGeneralResp();
|
GeneralResp generalResp = responseWrapper.getGeneralResp();
|
||||||
@@ -371,9 +377,9 @@ public class MasterDataServiceImpl implements MasterDataService {
|
|||||||
String apiName = BBPSConstant.API_FETCH_MASTER_DATA_CATEGORY_WISE;
|
String apiName = BBPSConstant.API_FETCH_MASTER_DATA_CATEGORY_WISE;
|
||||||
String requestId = masterRequest.getReqId();
|
String requestId = masterRequest.getReqId();
|
||||||
String mid = masterRequest.getMid();
|
String mid = masterRequest.getMid();
|
||||||
|
String userId = masterRequest.getClientUserId();
|
||||||
LOGGER.info("[{}] START | reqId={} | mid={} | billerName={} | category={}", apiName, requestId, mid,
|
LOGGER.info("[{}] START | reqId={} | mid={} | billerName={} | category={} | userId={}", apiName, requestId, mid,
|
||||||
masterRequest.getBillerName(), masterRequest.getCategory());
|
masterRequest.getBillerName(), masterRequest.getCategory(), userId);
|
||||||
|
|
||||||
String txnID = helper.generateTxnId(15);
|
String txnID = helper.generateTxnId(15);
|
||||||
String fullUrl = String.format("%s%s?billerName=%s&category=%s&page=%d&pagesize=%d", masterRegisterUrl,
|
String fullUrl = String.format("%s%s?billerName=%s&category=%s&page=%d&pagesize=%d", masterRegisterUrl,
|
||||||
@@ -414,7 +420,7 @@ public class MasterDataServiceImpl implements MasterDataService {
|
|||||||
|
|
||||||
BillerResponse responseWrapper = objectMapper.convertValue(dataMap, BillerResponse.class);
|
BillerResponse responseWrapper = objectMapper.convertValue(dataMap, BillerResponse.class);
|
||||||
List<BillerCategoryWise> savedEntities = mapperHelper.mapAndSaveAll(responseWrapper.getBillerResp(),
|
List<BillerCategoryWise> savedEntities = mapperHelper.mapAndSaveAll(responseWrapper.getBillerResp(),
|
||||||
requestId, txnID);
|
requestId, txnID, userId);
|
||||||
LOGGER.info("[{}] Saved {} records to DB | reqId={}", apiName, savedEntities.size(), requestId);
|
LOGGER.info("[{}] Saved {} records to DB | reqId={}", apiName, savedEntities.size(), requestId);
|
||||||
|
|
||||||
GeneralResp generalResp = responseWrapper.getGeneralResp();
|
GeneralResp generalResp = responseWrapper.getGeneralResp();
|
||||||
|
|||||||
@@ -192,7 +192,7 @@ public class BillerMapperHelper {
|
|||||||
* returns the saved list
|
* returns the saved list
|
||||||
*/
|
*/
|
||||||
public List<BillerCategoryWise> mapAndSaveAll(List<MasterCategoryBillerResponse> dtos, String requestId,
|
public List<BillerCategoryWise> mapAndSaveAll(List<MasterCategoryBillerResponse> dtos, String requestId,
|
||||||
String txnId) {
|
String txnId, String userId) {
|
||||||
if (dtos == null || dtos.isEmpty()) {
|
if (dtos == null || dtos.isEmpty()) {
|
||||||
return Collections.emptyList();
|
return Collections.emptyList();
|
||||||
}
|
}
|
||||||
@@ -216,6 +216,7 @@ public class BillerMapperHelper {
|
|||||||
biller.setCreateDateTime(new Date());
|
biller.setCreateDateTime(new Date());
|
||||||
biller.setRequestId(requestId);
|
biller.setRequestId(requestId);
|
||||||
biller.setTxnId(txnId);
|
biller.setTxnId(txnId);
|
||||||
|
biller.setUserId(userId);
|
||||||
|
|
||||||
// Handle icon
|
// Handle icon
|
||||||
BillerIconDTO iconDTO = dto.getBiller_icon();
|
BillerIconDTO iconDTO = dto.getBiller_icon();
|
||||||
@@ -871,7 +872,8 @@ public class BillerMapperHelper {
|
|||||||
return "SUCCESS";
|
return "SUCCESS";
|
||||||
}
|
}
|
||||||
|
|
||||||
public String saveContactMasterData(List<ContactMaster> contactMasterList, String requestId, String txnID) {
|
public String saveContactMasterData(List<ContactMaster> contactMasterList, String requestId, String txnID,
|
||||||
|
String userId) {
|
||||||
|
|
||||||
if (contactMasterList == null || contactMasterList.isEmpty()) {
|
if (contactMasterList == null || contactMasterList.isEmpty()) {
|
||||||
return "No contact master data found";
|
return "No contact master data found";
|
||||||
@@ -883,6 +885,7 @@ public class BillerMapperHelper {
|
|||||||
entity.setMobNo(dto.getMobNo());
|
entity.setMobNo(dto.getMobNo());
|
||||||
entity.setReqId(requestId);
|
entity.setReqId(requestId);
|
||||||
entity.setTxnId(txnID);
|
entity.setTxnId(txnID);
|
||||||
|
entity.setUserId(userId);
|
||||||
entity.setCreateDateTime(new Date());
|
entity.setCreateDateTime(new Date());
|
||||||
return entity;
|
return entity;
|
||||||
}).collect(Collectors.toList());
|
}).collect(Collectors.toList());
|
||||||
@@ -906,7 +909,7 @@ public class BillerMapperHelper {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void saveOrUpdateBillData(BillDataResponse responseWrapper,
|
public void saveOrUpdateBillData(BillDataResponse responseWrapper,
|
||||||
BillFetchByBillIdRequest billFetchByBillIdRequest, String txnId) {
|
BillFetchByBillIdRequest billFetchByBillIdRequest, String txnId, String reqId, String userId) {
|
||||||
|
|
||||||
BillMaster billMaster = new BillMaster();
|
BillMaster billMaster = new BillMaster();
|
||||||
|
|
||||||
@@ -918,6 +921,8 @@ public class BillerMapperHelper {
|
|||||||
billMaster.setUserId(responseWrapper.getUserId());
|
billMaster.setUserId(responseWrapper.getUserId());
|
||||||
billMaster.setReqId(billFetchByBillIdRequest.getReqId());
|
billMaster.setReqId(billFetchByBillIdRequest.getReqId());
|
||||||
billMaster.setTxnId(txnId);
|
billMaster.setTxnId(txnId);
|
||||||
|
billMaster.setReqId(reqId);
|
||||||
|
billMaster.setUserId(userId);
|
||||||
billMaster.setClientUserId(billFetchByBillIdRequest.getClientUserId());
|
billMaster.setClientUserId(billFetchByBillIdRequest.getClientUserId());
|
||||||
|
|
||||||
// BILLER RESPONSE
|
// BILLER RESPONSE
|
||||||
@@ -1056,7 +1061,7 @@ public class BillerMapperHelper {
|
|||||||
|
|
||||||
BillPaymentForwardRequest forward = new BillPaymentForwardRequest();
|
BillPaymentForwardRequest forward = new BillPaymentForwardRequest();
|
||||||
|
|
||||||
forward.setTenantId(req.getTenantId());
|
// forward.setTenantId(req.getTenantId());
|
||||||
forward.setRefId(req.getRefId());
|
forward.setRefId(req.getRefId());
|
||||||
forward.setBillId(req.getBillId());
|
forward.setBillId(req.getBillId());
|
||||||
forward.setAmountOptions(req.isAmountOptions());
|
forward.setAmountOptions(req.isAmountOptions());
|
||||||
|
|||||||
Reference in New Issue
Block a user