add logger in complaint
This commit is contained in:
@@ -89,25 +89,23 @@ public class ComplainServiceImpl implements ComplainService {
|
|||||||
String apiName = BBPSConstant.API_ADD_COMPLAIN;
|
String apiName = BBPSConstant.API_ADD_COMPLAIN;
|
||||||
String requestId = complainRequestDTO.getReqId();
|
String requestId = complainRequestDTO.getReqId();
|
||||||
String mid = complainRequestDTO.getMid();
|
String mid = complainRequestDTO.getMid();
|
||||||
|
|
||||||
LOGGER.info("[{}] START | reqId={} | mid={}", apiName, requestId, mid);
|
LOGGER.info("[{}] START | reqId={} | mid={}", apiName, requestId, mid);
|
||||||
|
|
||||||
helper.validateMerchant(mid);
|
|
||||||
String txnId = helper.generateTxnId(15);
|
String txnId = helper.generateTxnId(15);
|
||||||
String fullUrl = complainDataUrl + BBPSConstant.ADD_COMPLAIN_ENDPOINT;
|
String fullUrl = complainDataUrl + BBPSConstant.ADD_COMPLAIN_ENDPOINT;
|
||||||
LOGGER.info("[{}] Full URL={}", apiName, fullUrl);
|
LOGGER.info("[{}] Full URL={}", apiName, fullUrl);
|
||||||
// Fetch tenant & agent from DB
|
// Fetch tenant & agent from DB
|
||||||
BharatConnectMaster headersData = beneficiaryDetailsRepository.findByOrgId(BBPSConstant.ORG_ID);
|
|
||||||
ObjectMapper objectMapper = new ObjectMapper();
|
|
||||||
objectMapper.setSerializationInclusion(JsonInclude.Include.NON_NULL);
|
|
||||||
FetchComplaintForwardRequest forwardReq = mapperHelper.fetchComplaintForwardRequestMap(complainRequestDTO);
|
FetchComplaintForwardRequest forwardReq = mapperHelper.fetchComplaintForwardRequestMap(complainRequestDTO);
|
||||||
|
|
||||||
String forwardJson = helper.convertObjectToJson(forwardReq);
|
String forwardJson = helper.convertObjectToJson(forwardReq);
|
||||||
String requestJson = helper.convertObjectToJson(complainRequestDTO);
|
String requestJson = helper.convertObjectToJson(complainRequestDTO);
|
||||||
HttpHeaders headers = helper.buildHeaders(headersData);
|
|
||||||
|
|
||||||
InboundTraceLog inboundLog = helper.createInboundLog(requestId, txnId, apiName, complainRequestDTO.getMid(),
|
InboundTraceLog inboundLog = helper.createInboundLog(requestId, txnId, apiName, complainRequestDTO.getMid(),
|
||||||
BBPSConstant.HTTP_POST, requestJson);
|
BBPSConstant.HTTP_POST, requestJson);
|
||||||
|
helper.validateMerchant(mid);
|
||||||
|
BharatConnectMaster headersData = beneficiaryDetailsRepository.findByOrgId(BBPSConstant.ORG_ID);
|
||||||
|
HttpHeaders headers = helper.buildHeaders(headersData);
|
||||||
|
ObjectMapper objectMapper = new ObjectMapper();
|
||||||
|
objectMapper.setSerializationInclusion(JsonInclude.Include.NON_NULL);
|
||||||
|
|
||||||
OutboundTraceLog outboundLog = helper.createOutboundLog(txnId, requestId, apiName, fullUrl,
|
OutboundTraceLog outboundLog = helper.createOutboundLog(txnId, requestId, apiName, fullUrl,
|
||||||
BBPSConstant.HTTP_POST, null);
|
BBPSConstant.HTTP_POST, null);
|
||||||
|
|
||||||
@@ -182,22 +180,19 @@ public class ComplainServiceImpl implements ComplainService {
|
|||||||
LOGGER.info("[{}] START | reqId={} | mid={} | ticketId={}", apiName, reqId, mid, ticketId);
|
LOGGER.info("[{}] START | reqId={} | mid={} | ticketId={}", apiName, reqId, mid, ticketId);
|
||||||
String fullUrl = agentDtaUrl + BBPSConstant.COMPALINT_STATUS;
|
String fullUrl = agentDtaUrl + BBPSConstant.COMPALINT_STATUS;
|
||||||
|
|
||||||
helper.validateMerchant(request.getMid());
|
|
||||||
String txnId = helper.generateTxnId(15);
|
String txnId = helper.generateTxnId(15);
|
||||||
BharatConnectMaster headersData = beneficiaryDetailsRepository.findByOrgId(BBPSConstant.ORG_ID);
|
|
||||||
|
|
||||||
HttpHeaders headers = helper.buildHeaders(headersData);
|
|
||||||
|
|
||||||
// Convert request to JSON
|
|
||||||
ObjectMapper objectMapper = new ObjectMapper();
|
|
||||||
objectMapper.setSerializationInclusion(JsonInclude.Include.NON_NULL);
|
|
||||||
FetchTicketLatestStatusRequest forwardReq = mapperHelper.fetchTicketLatestStatusRequestMap(request);
|
FetchTicketLatestStatusRequest forwardReq = mapperHelper.fetchTicketLatestStatusRequestMap(request);
|
||||||
|
|
||||||
String forwardJson = helper.convertObjectToJson(forwardReq);
|
String forwardJson = helper.convertObjectToJson(forwardReq);
|
||||||
String requestJson = helper.convertObjectToJson(request);
|
String requestJson = helper.convertObjectToJson(request);
|
||||||
|
|
||||||
InboundTraceLog inboundLog = helper.createInboundLog(reqId, txnId, apiName, request.getMid(),
|
InboundTraceLog inboundLog = helper.createInboundLog(reqId, txnId, apiName, request.getMid(),
|
||||||
BBPSConstant.HTTP_POST, requestJson);
|
BBPSConstant.HTTP_POST, requestJson);
|
||||||
|
helper.validateMerchant(request.getMid());
|
||||||
|
BharatConnectMaster headersData = beneficiaryDetailsRepository.findByOrgId(BBPSConstant.ORG_ID);
|
||||||
|
HttpHeaders headers = helper.buildHeaders(headersData);
|
||||||
|
// Convert request to JSON
|
||||||
|
ObjectMapper objectMapper = new ObjectMapper();
|
||||||
|
objectMapper.setSerializationInclusion(JsonInclude.Include.NON_NULL);
|
||||||
OutboundTraceLog outboundLog = helper.createOutboundLog(txnId, reqId, apiName, fullUrl, BBPSConstant.HTTP_POST,
|
OutboundTraceLog outboundLog = helper.createOutboundLog(txnId, reqId, apiName, fullUrl, BBPSConstant.HTTP_POST,
|
||||||
complaintId);
|
complaintId);
|
||||||
|
|
||||||
@@ -259,8 +254,6 @@ public class ComplainServiceImpl implements ComplainService {
|
|||||||
@Override
|
@Override
|
||||||
public ResponseModel viewComplaintHistory(ComplainStatusRequest request) {
|
public ResponseModel viewComplaintHistory(ComplainStatusRequest request) {
|
||||||
|
|
||||||
LOGGER.info("Fetching View Complaint History Complaint by Complaint Id={}", request.getTicketId(),
|
|
||||||
request.getReqId());
|
|
||||||
String apiName = BBPSConstant.API_VIEW_COMPLAINT_HISTORY;
|
String apiName = BBPSConstant.API_VIEW_COMPLAINT_HISTORY;
|
||||||
String reqId = request.getReqId();
|
String reqId = request.getReqId();
|
||||||
String ticketId = request.getTicketId();
|
String ticketId = request.getTicketId();
|
||||||
@@ -269,16 +262,13 @@ public class ComplainServiceImpl implements ComplainService {
|
|||||||
LOGGER.info("[{}] START | reqId={} | mid={} | ticketId={}", apiName, reqId, mid, ticketId);
|
LOGGER.info("[{}] START | reqId={} | mid={} | ticketId={}", apiName, reqId, mid, ticketId);
|
||||||
String fullUrl = agentDtaUrl + BBPSConstant.COMPLAINT_HISTORY + request.getTicketId();
|
String fullUrl = agentDtaUrl + BBPSConstant.COMPLAINT_HISTORY + request.getTicketId();
|
||||||
|
|
||||||
helper.validateMerchant(request.getMid());
|
|
||||||
String txnId = helper.generateTxnId(15);
|
String txnId = helper.generateTxnId(15);
|
||||||
|
|
||||||
BharatConnectMaster headersData = beneficiaryDetailsRepository.findByOrgId(BBPSConstant.ORG_ID);
|
|
||||||
HttpHeaders headers = helper.buildHeaders(headersData);
|
|
||||||
|
|
||||||
String requestJson = helper.convertObjectToJson(request);
|
String requestJson = helper.convertObjectToJson(request);
|
||||||
|
|
||||||
InboundTraceLog inboundLog = helper.createInboundLog(reqId, txnId, apiName, request.getMid(),
|
InboundTraceLog inboundLog = helper.createInboundLog(reqId, txnId, apiName, request.getMid(),
|
||||||
BBPSConstant.HTTP_GET, requestJson);
|
BBPSConstant.HTTP_GET, requestJson);
|
||||||
|
helper.validateMerchant(request.getMid());
|
||||||
|
BharatConnectMaster headersData = beneficiaryDetailsRepository.findByOrgId(BBPSConstant.ORG_ID);
|
||||||
|
HttpHeaders headers = helper.buildHeaders(headersData);
|
||||||
OutboundTraceLog outboundLog = helper.createOutboundLog(txnId, reqId, apiName, fullUrl, BBPSConstant.HTTP_GET,
|
OutboundTraceLog outboundLog = helper.createOutboundLog(txnId, reqId, apiName, fullUrl, BBPSConstant.HTTP_GET,
|
||||||
ticketId);
|
ticketId);
|
||||||
LOGGER.debug("Outbound log created successfully for Complaint : {}", fullUrl);
|
LOGGER.debug("Outbound log created successfully for Complaint : {}", fullUrl);
|
||||||
@@ -334,20 +324,17 @@ public class ComplainServiceImpl implements ComplainService {
|
|||||||
String reqId = request.getReqId();
|
String reqId = request.getReqId();
|
||||||
String ticketId = request.getTicketId();
|
String ticketId = request.getTicketId();
|
||||||
String mid = request.getMid();
|
String mid = request.getMid();
|
||||||
|
|
||||||
LOGGER.info("[{}] START | reqId={} | mid={} | ticketId={}", apiName, reqId, mid, ticketId);
|
LOGGER.info("[{}] START | reqId={} | mid={} | ticketId={}", apiName, reqId, mid, ticketId);
|
||||||
|
|
||||||
helper.validateMerchant(request.getMid());
|
|
||||||
String txnId = helper.generateTxnId(15);
|
String txnId = helper.generateTxnId(15);
|
||||||
String fullUrl = agentDtaUrl + BBPSConstant.VIEW_COMPLAINT_BY_ID + request.getTicketId();
|
String fullUrl = agentDtaUrl + BBPSConstant.VIEW_COMPLAINT_BY_ID + request.getTicketId();
|
||||||
|
|
||||||
BharatConnectMaster headersData = beneficiaryDetailsRepository.findByOrgId(BBPSConstant.ORG_ID);
|
|
||||||
HttpHeaders headers = helper.buildHeaders(headersData);
|
|
||||||
|
|
||||||
String requestJson = helper.convertObjectToJson(request);
|
String requestJson = helper.convertObjectToJson(request);
|
||||||
|
|
||||||
InboundTraceLog inboundLog = helper.createInboundLog(reqId, txnId, apiName, request.getMid(),
|
InboundTraceLog inboundLog = helper.createInboundLog(reqId, txnId, apiName, request.getMid(),
|
||||||
BBPSConstant.HTTP_GET, requestJson);
|
BBPSConstant.HTTP_GET, requestJson);
|
||||||
|
helper.validateMerchant(request.getMid());
|
||||||
|
BharatConnectMaster headersData = beneficiaryDetailsRepository.findByOrgId(BBPSConstant.ORG_ID);
|
||||||
|
HttpHeaders headers = helper.buildHeaders(headersData);
|
||||||
OutboundTraceLog outboundLog = helper.createOutboundLog(txnId, reqId, apiName, fullUrl, BBPSConstant.HTTP_GET,
|
OutboundTraceLog outboundLog = helper.createOutboundLog(txnId, reqId, apiName, fullUrl, BBPSConstant.HTTP_GET,
|
||||||
ticketId);
|
ticketId);
|
||||||
LOGGER.debug("Outbound log created successfully for Complaint : {}", fullUrl);
|
LOGGER.debug("Outbound log created successfully for Complaint : {}", fullUrl);
|
||||||
@@ -405,10 +392,10 @@ public class ComplainServiceImpl implements ComplainService {
|
|||||||
String fullUrl = BBPSConstant.DB_OPTIONS;
|
String fullUrl = BBPSConstant.DB_OPTIONS;
|
||||||
|
|
||||||
String requestJson = helper.convertObjectToJson(request);
|
String requestJson = helper.convertObjectToJson(request);
|
||||||
// Validate merchant
|
|
||||||
helper.validateMerchant(request.getMid());
|
|
||||||
InboundTraceLog inboundLog = helper.createInboundLog(reqId, txnId, apiName, request.getMid(),
|
InboundTraceLog inboundLog = helper.createInboundLog(reqId, txnId, apiName, request.getMid(),
|
||||||
BBPSConstant.HTTP_GET, requestJson);
|
BBPSConstant.HTTP_GET, requestJson);
|
||||||
|
// Validate merchant
|
||||||
|
helper.validateMerchant(request.getMid());
|
||||||
OutboundTraceLog outboundLog = helper.createOutboundLog(txnId, reqId, apiName, fullUrl,
|
OutboundTraceLog outboundLog = helper.createOutboundLog(txnId, reqId, apiName, fullUrl,
|
||||||
BBPSConstant.HTTP_GET, null);
|
BBPSConstant.HTTP_GET, null);
|
||||||
LOGGER.debug("Outbound log created successfully for Complaint : {}", fullUrl);
|
LOGGER.debug("Outbound log created successfully for Complaint : {}", fullUrl);
|
||||||
@@ -452,17 +439,17 @@ public class ComplainServiceImpl implements ComplainService {
|
|||||||
String transactionId = request.getId();
|
String transactionId = request.getId();
|
||||||
LOGGER.info("[{}] START | reqId={} | mid={} | txnId={}", apiName, reqId, mid, transactionId);
|
LOGGER.info("[{}] START | reqId={} | mid={} | txnId={}", apiName, reqId, mid, transactionId);
|
||||||
|
|
||||||
helper.validateMerchant(request.getMid());
|
|
||||||
String txnId = helper.generateTxnId(15);
|
String txnId = helper.generateTxnId(15);
|
||||||
String fullUrl = agentDtaUrl + BBPSConstant.CHECK_TRANSACTION_URL + request.getId();
|
String fullUrl = agentDtaUrl + BBPSConstant.CHECK_TRANSACTION_URL + request.getId();
|
||||||
|
|
||||||
BharatConnectMaster headersData = beneficiaryDetailsRepository.findByOrgId(BBPSConstant.ORG_ID);
|
|
||||||
HttpHeaders headers = helper.buildHeaders(headersData);
|
|
||||||
|
|
||||||
String requestJson = helper.convertObjectToJson(request);
|
String requestJson = helper.convertObjectToJson(request);
|
||||||
|
|
||||||
InboundTraceLog inboundLog = helper.createInboundLog(reqId, txnId, apiName, request.getMid(),
|
InboundTraceLog inboundLog = helper.createInboundLog(reqId, txnId, apiName, request.getMid(),
|
||||||
BBPSConstant.HTTP_GET, requestJson);
|
BBPSConstant.HTTP_GET, requestJson);
|
||||||
|
helper.validateMerchant(request.getMid());
|
||||||
|
|
||||||
|
BharatConnectMaster headersData = beneficiaryDetailsRepository.findByOrgId(BBPSConstant.ORG_ID);
|
||||||
|
HttpHeaders headers = helper.buildHeaders(headersData);
|
||||||
OutboundTraceLog outboundLog = helper.createOutboundLog(txnId, reqId, apiName, fullUrl, BBPSConstant.HTTP_GET,
|
OutboundTraceLog outboundLog = helper.createOutboundLog(txnId, reqId, apiName, fullUrl, BBPSConstant.HTTP_GET,
|
||||||
ID);
|
ID);
|
||||||
LOGGER.debug("Outbound log created successfully for Complaint : {}", fullUrl);
|
LOGGER.debug("Outbound log created successfully for Complaint : {}", fullUrl);
|
||||||
@@ -515,19 +502,17 @@ public class ComplainServiceImpl implements ComplainService {
|
|||||||
String statusType = request.getStatusType();
|
String statusType = request.getStatusType();
|
||||||
|
|
||||||
LOGGER.info("[{}] START | reqId={} | mid={} | statusType={}", apiName, reqId, mid, statusType);
|
LOGGER.info("[{}] START | reqId={} | mid={} | statusType={}", apiName, reqId, mid, statusType);
|
||||||
|
|
||||||
helper.validateMerchant(request.getMid());
|
|
||||||
String txnId = helper.generateTxnId(15);
|
String txnId = helper.generateTxnId(15);
|
||||||
String fullUrl = complainDataUrl + BBPSConstant.VIEW_ALL_COMPLAINTS_BASE + "?pageNo=" + request.getPageNo()
|
String fullUrl = complainDataUrl + BBPSConstant.VIEW_ALL_COMPLAINTS_BASE + "?pageNo=" + request.getPageNo()
|
||||||
+ "&pageSize=" + request.getPageSize() + "&statusType=" + request.getStatusType() + "&ticketType="
|
+ "&pageSize=" + request.getPageSize() + "&statusType=" + request.getStatusType() + "&ticketType="
|
||||||
+ request.getTicketType();
|
+ request.getTicketType();
|
||||||
|
|
||||||
BharatConnectMaster headersData = beneficiaryDetailsRepository.findByOrgId(BBPSConstant.ORG_ID);
|
|
||||||
HttpHeaders headers = helper.buildHeaders(headersData);
|
|
||||||
|
|
||||||
String requestJson = helper.convertObjectToJson(request);
|
String requestJson = helper.convertObjectToJson(request);
|
||||||
InboundTraceLog inboundLog = helper.createInboundLog(reqId, txnId, apiName, request.getMid(),
|
InboundTraceLog inboundLog = helper.createInboundLog(reqId, txnId, apiName, request.getMid(),
|
||||||
BBPSConstant.HTTP_POST, requestJson);
|
BBPSConstant.HTTP_POST, requestJson);
|
||||||
|
helper.validateMerchant(request.getMid());
|
||||||
|
BharatConnectMaster headersData = beneficiaryDetailsRepository.findByOrgId(BBPSConstant.ORG_ID);
|
||||||
|
HttpHeaders headers = helper.buildHeaders(headersData);
|
||||||
OutboundTraceLog outboundLog = helper.createOutboundLog(txnId, reqId, apiName, fullUrl, BBPSConstant.HTTP_GET,
|
OutboundTraceLog outboundLog = helper.createOutboundLog(txnId, reqId, apiName, fullUrl, BBPSConstant.HTTP_GET,
|
||||||
request.getStatusType());
|
request.getStatusType());
|
||||||
LOGGER.debug("Outbound log created successfully for Complaint : {}", fullUrl);
|
LOGGER.debug("Outbound log created successfully for Complaint : {}", fullUrl);
|
||||||
|
|||||||
@@ -20,9 +20,9 @@ swagger.server.description=Local Development Server
|
|||||||
# DataSource
|
# DataSource
|
||||||
spring.datasource.url=jdbc:postgresql://localhost:5432/BBPS
|
spring.datasource.url=jdbc:postgresql://localhost:5432/BBPS
|
||||||
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