04-12-25
This commit is contained in:
@@ -239,9 +239,9 @@ public class MasterDataServiceImpl implements MasterDataService {
|
||||
String apiName = BBPSConstant.API_GET_CUSTOMER_PARAM_BY_BILLER_ID;
|
||||
String requestId = customerParamRequest.getReqId();
|
||||
String mid = customerParamRequest.getMid();
|
||||
|
||||
LOGGER.info("[{}] START | reqId={} | mid={} | billerId={}", apiName, requestId, mid,
|
||||
customerParamRequest.getBillerId());
|
||||
String userId = customerParamRequest.getClientUserId();
|
||||
LOGGER.info("[{}] START | reqId={} | mid={} | billerId={} | userId={}", apiName, requestId, mid,
|
||||
customerParamRequest.getBillerId(), userId);
|
||||
String txnID = helper.generateTxnId(15);
|
||||
String billerId = customerParamRequest.getBillerId();
|
||||
String fullUrl = masterRegisterUrl + BBPSConstant.CUSTOMPARAM_URL + billerId;
|
||||
@@ -282,8 +282,13 @@ public class MasterDataServiceImpl implements MasterDataService {
|
||||
mapper.getConfiguration().setMatchingStrategy(MatchingStrategies.STRICT);
|
||||
|
||||
// Map DTOs to entities
|
||||
List<CustomParam> entities = customParams.stream().map(dto -> mapper.map(dto, CustomParam.class))
|
||||
.collect(Collectors.toList());
|
||||
List<CustomParam> entities = customParams.stream().map(dto -> {
|
||||
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
|
||||
customParamReposiotory.saveAll(entities);
|
||||
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 requestId = contactMasterRequest.getReqId();
|
||||
String mid = contactMasterRequest.getMid();
|
||||
LOGGER.info("[{}] START | reqId={} | mid={} | category={}", apiName, requestId, contactMasterRequest.getMid(),
|
||||
contactMasterRequest.getCategory());
|
||||
String userId = contactMasterRequest.getClientUserId();
|
||||
LOGGER.info("[{}] START | reqId={} | mid={} | category={} | userId={}", apiName, requestId,
|
||||
contactMasterRequest.getMid(), contactMasterRequest.getCategory(), userId);
|
||||
String txnID = helper.generateTxnId(15);
|
||||
|
||||
BharatConnectMaster headersData = beneficiaryDetailsRepository.findByOrgId(BBPSConstant.ORG_ID);
|
||||
@@ -345,8 +351,8 @@ public class MasterDataServiceImpl implements MasterDataService {
|
||||
}
|
||||
|
||||
ContactMasterResponse responseWrapper = objectMapper.convertValue(dataMap, ContactMasterResponse.class);
|
||||
String result = mapperHelper.saveContactMasterData(responseWrapper.getContactMasterList(), requestId,
|
||||
txnID);
|
||||
String result = mapperHelper.saveContactMasterData(responseWrapper.getContactMasterList(), requestId, txnID,
|
||||
userId);
|
||||
|
||||
LOGGER.info("[{}] DB Save Result | reqId={} | result={}", apiName, requestId, result);
|
||||
GeneralResp generalResp = responseWrapper.getGeneralResp();
|
||||
@@ -371,9 +377,9 @@ public class MasterDataServiceImpl implements MasterDataService {
|
||||
String apiName = BBPSConstant.API_FETCH_MASTER_DATA_CATEGORY_WISE;
|
||||
String requestId = masterRequest.getReqId();
|
||||
String mid = masterRequest.getMid();
|
||||
|
||||
LOGGER.info("[{}] START | reqId={} | mid={} | billerName={} | category={}", apiName, requestId, mid,
|
||||
masterRequest.getBillerName(), masterRequest.getCategory());
|
||||
String userId = masterRequest.getClientUserId();
|
||||
LOGGER.info("[{}] START | reqId={} | mid={} | billerName={} | category={} | userId={}", apiName, requestId, mid,
|
||||
masterRequest.getBillerName(), masterRequest.getCategory(), userId);
|
||||
|
||||
String txnID = helper.generateTxnId(15);
|
||||
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);
|
||||
List<BillerCategoryWise> savedEntities = mapperHelper.mapAndSaveAll(responseWrapper.getBillerResp(),
|
||||
requestId, txnID);
|
||||
requestId, txnID, userId);
|
||||
LOGGER.info("[{}] Saved {} records to DB | reqId={}", apiName, savedEntities.size(), requestId);
|
||||
|
||||
GeneralResp generalResp = responseWrapper.getGeneralResp();
|
||||
|
||||
Reference in New Issue
Block a user