This commit is contained in:
Mohd-Arham
2025-12-04 18:37:44 +05:30
parent 812aa3c2ff
commit f15e967e58
17 changed files with 177 additions and 100 deletions
@@ -164,6 +164,7 @@ public class AgentServiceImpl implements AgentService {
String txnId = helper.generateTxnId(15);
String reqId = billFetchByBillIdRequest.getReqId();
String billId = billFetchByBillIdRequest.getBillId();
String userId = billFetchByBillIdRequest.getClientUserId();
String fullUrl = agentDtaUrl + BBPSConstant.BILL_FETCH_BY_ID + billFetchByBillIdRequest.getBillId();
OutboundTraceLog outboundLog = helper.createOutboundLog(txnId, reqId, apiName, fullUrl, BBPSConstant.HTTP_GET,
null);
@@ -197,7 +198,7 @@ public class AgentServiceImpl implements AgentService {
LOGGER.info("Current Bill Status: {}", status);
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);
return new ResponseModel(generalResp.getMessage(), generalResp.getStatus(),
@@ -216,8 +217,9 @@ public class AgentServiceImpl implements AgentService {
String reqId = billFetchByBillIdRequest.getReqId();
String billId = billFetchByBillIdRequest.getBillId();
String mid = billFetchByBillIdRequest.getMid();
String userId = billFetchByBillIdRequest.getClientUserId();
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 txnId = helper.generateTxnId(15);
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
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("[{}] END | reqId={} | status={}", apiName, reqId, generalResp.getStatus());
return responseModel;
@@ -396,7 +398,7 @@ public class AgentServiceImpl implements AgentService {
helper.updateInboundLogSuccess(inboundLog, responseData, generalResp.getStatus());
System.out.println("responseWrapper:" + responseWrapper);
mapperHelper.saveBillValidation(responseWrapper, billRequest,txnId);
mapperHelper.saveBillValidation(responseWrapper, billRequest, txnId);
return new ResponseModel(generalResp.getMessage(), generalResp.getStatus(),
Integer.parseInt(generalResp.getStatusCode()), responseWrapper);
} catch (JsonProcessingException e) {
@@ -454,7 +456,7 @@ public class AgentServiceImpl implements AgentService {
GeneralResp generalResp = responseWrapper.getGenericResponse();
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("[{}] END | reqId={} | status={}", apiName, reqId, generalResp.getStatus());
return new ResponseModel(generalResp.getMessage(), generalResp.getStatus(),