user id addded in this code

This commit is contained in:
Mohd-Arham
2025-12-03 17:40:04 +05:30
parent d521459227
commit 003dd9325c
33 changed files with 723 additions and 568 deletions
@@ -120,6 +120,7 @@ public class AgentServiceImpl implements AgentService {
billMaster.setBillId((String) dataMap.get("billId"));
billMaster.setReqId(fetchBillRequest.getReqId());
billMaster.setTxnId(txnId);
billMaster.setClientUserId(fetchBillRequest.getClientUserId());
billMasterRepository.save(billMaster);
LOGGER.info("BillMaster saved for billId: {}", billMaster.getBillId());
@@ -131,6 +132,7 @@ public class AgentServiceImpl implements AgentService {
billInitiate.setBillId((String) dataMap.get("billId"));
billInitiate.setReqId(fetchBillRequest.getReqId());
billInitiate.setTxnId(txnId);
billInitiate.setClientUserId(fetchBillRequest.getClientUserId());
billIntiateRepository.save(billInitiate);
LOGGER.info("BillInitiate entry saved for billId: {}", billInitiate.getBillId());
@@ -394,7 +396,7 @@ public class AgentServiceImpl implements AgentService {
helper.updateInboundLogSuccess(inboundLog, responseData, generalResp.getStatus());
System.out.println("responseWrapper:" + responseWrapper);
mapperHelper.saveBillValidation(responseWrapper, billRequest);
mapperHelper.saveBillValidation(responseWrapper, billRequest,txnId);
return new ResponseModel(generalResp.getMessage(), generalResp.getStatus(),
Integer.parseInt(generalResp.getStatusCode()), responseWrapper);
} catch (JsonProcessingException e) {
@@ -412,7 +414,7 @@ public class AgentServiceImpl implements AgentService {
String reqId = billRequest.getReqId();
String billId = billRequest.getBillId();
String mid = billRequest.getMid();
String requestJson = helper.convertObjectToJson(billRequest);
String requestJson = helper.convertObjectToJson(billRequest);
LOGGER.info("[{}] START | reqId={} | mid={} | billId={}", apiName, billRequest, mid, billId);
String txnId = helper.generateTxnId(15);
String fullUrl = agentDtaUrl + BBPSConstant.BILL_VALIDATE_ID_URL + billRequest.getBillId();
@@ -452,7 +454,7 @@ public class AgentServiceImpl implements AgentService {
GeneralResp generalResp = responseWrapper.getGenericResponse();
helper.updateInboundLogSuccess(inboundLog, responseData, generalResp.getStatus());
mapperHelper.saveBillValidation(responseWrapper, billRequest);
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(),
@@ -484,8 +486,8 @@ public class AgentServiceImpl implements AgentService {
String requestJson = helper.convertObjectToJson(billValidateByClientIdRequest);
LOGGER.info("[{}] START | reqId={} | mid={} | clientReqId={}", apiName, reqId, mid,
billValidateByClientIdRequest.getClientReqId());
InboundTraceLog inboundLog = helper.createInboundLog(reqId, txnId, apiName,
billValidateByClientIdRequest.getMid(), BBPSConstant.HTTP_GET,requestJson);
InboundTraceLog inboundLog = helper.createInboundLog(reqId, txnId, apiName,
billValidateByClientIdRequest.getMid(), BBPSConstant.HTTP_GET, requestJson);
helper.validateMerchant(billValidateByClientIdRequest.getMid());
Optional<BillInitiate> billInitiate = billIntiateRepository.findByReqId(clientReqId);