added intentbased pg
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
package com.billpaymentservice.bbps.util;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.Date;
|
||||
@@ -37,11 +38,13 @@ import com.billpaymentservice.bbps.dto.request.ComplaintRequestDTO;
|
||||
import com.billpaymentservice.bbps.dto.request.FetchBillRequest;
|
||||
import com.billpaymentservice.bbps.dto.request.FetchBillValidatestRequest;
|
||||
import com.billpaymentservice.bbps.dto.request.GetTicketLatestStausRequest;
|
||||
import com.billpaymentservice.bbps.dto.request.PaymentStartUserRequest;
|
||||
import com.billpaymentservice.bbps.dto.response.AmountOptionsResponse;
|
||||
import com.billpaymentservice.bbps.dto.response.BillDataResponse;
|
||||
import com.billpaymentservice.bbps.dto.response.ClientReqIdResponse;
|
||||
import com.billpaymentservice.bbps.dto.response.ComplaintHistoryStatusResponse;
|
||||
import com.billpaymentservice.bbps.dto.response.FetchBillValidateResponse;
|
||||
import com.billpaymentservice.bbps.dto.response.PaymentStartApiResponse;
|
||||
import com.billpaymentservice.bbps.dto.response.PlanResponse;
|
||||
import com.billpaymentservice.bbps.dto.response.TicketCheckStatusResponse;
|
||||
import com.billpaymentservice.bbps.dto.response.ViewAllComplaintsResponse;
|
||||
@@ -77,6 +80,7 @@ import com.billpaymentservice.bbps.entites.CustomerParamBill;
|
||||
import com.billpaymentservice.bbps.entites.CustomerParamBillValidation;
|
||||
import com.billpaymentservice.bbps.entites.CustomerParamGroupById;
|
||||
import com.billpaymentservice.bbps.entites.GroupParam;
|
||||
import com.billpaymentservice.bbps.entites.PaymentStartRecord;
|
||||
import com.billpaymentservice.bbps.entites.Plan;
|
||||
import com.billpaymentservice.bbps.entites.PlanCategorySubType;
|
||||
import com.billpaymentservice.bbps.entites.PlanResponses;
|
||||
@@ -99,11 +103,14 @@ import com.billpaymentservice.bbps.repository.ComplaintStatusRepository;
|
||||
import com.billpaymentservice.bbps.repository.ContactMasterDataRepository;
|
||||
import com.billpaymentservice.bbps.repository.CustomerParamGroupByBillerIdRepository;
|
||||
import com.billpaymentservice.bbps.repository.FetchBillValidateRepository;
|
||||
import com.billpaymentservice.bbps.repository.PaymentStartRecordRepository;
|
||||
import com.billpaymentservice.bbps.repository.PlanResponseRepository;
|
||||
import com.billpaymentservice.bbps.repository.ReOpenComplaintRepository;
|
||||
import com.billpaymentservice.bbps.repository.TicketDispositionRepository;
|
||||
import com.billpaymentservice.bbps.repository.ViewAllComplainTicketDetailRepository;
|
||||
|
||||
import jakarta.persistence.Column;
|
||||
|
||||
@Component
|
||||
public class BillerMapperHelper {
|
||||
|
||||
@@ -128,7 +135,7 @@ public class BillerMapperHelper {
|
||||
private final BillerDataRepository billerDataRespository;
|
||||
private final BillMasterRepository billMasterRepository;
|
||||
private final BillValidationRepository billValidationRepository;
|
||||
|
||||
private final PaymentStartRecordRepository paymentStartRecordRepository;
|
||||
public BillerMapperHelper(BillerCategoryWiseRepository billerRepo,
|
||||
CustomerParamGroupByBillerIdRepository customerParamGroupByBillerIdRepo,
|
||||
AmountOptionByBillerIdRepository amountOptionByBillerIdRepository,
|
||||
@@ -143,7 +150,9 @@ public class BillerMapperHelper {
|
||||
ViewAllComplainTicketDetailRepository viewAllComplainTicketDetailRepository,
|
||||
ContactMasterDataRepository contactMasterDataRepository, BBPSMasterDataRepo bbpsMasterDataRepo,
|
||||
BillerDataRepository billerDataRespository, BillMasterRepository billMasterRepository,
|
||||
BillValidationRepository billValidationRepository) {
|
||||
BillValidationRepository billValidationRepository,
|
||||
PaymentStartRecordRepository paymentStartRecordRepository) {
|
||||
this.paymentStartRecordRepository = paymentStartRecordRepository;
|
||||
this.billerRepo = billerRepo;
|
||||
this.customerParamGroupByBillerIdRepo = customerParamGroupByBillerIdRepo;
|
||||
this.amountOptionByBillerIdRepository = amountOptionByBillerIdRepository;
|
||||
@@ -1057,4 +1066,25 @@ public class BillerMapperHelper {
|
||||
forward.setTxnNpciId(request.getTxnNpciId());
|
||||
return forward;
|
||||
}
|
||||
|
||||
public void savePaymentStartRecord(PaymentStartUserRequest request, PaymentStartApiResponse apiResponse,
|
||||
String txnId, String orderNo) {
|
||||
PaymentStartRecord record = new PaymentStartRecord();
|
||||
record.setOrderNo(orderNo);
|
||||
record.setRequestId(request.getReqId());
|
||||
record.setClientMid(request.getMid());
|
||||
record.setClientUserId(request.getClientUserId());
|
||||
record.setInternalTxnId(txnId);
|
||||
record.setAmount(apiResponse.getResponseData().getAmount());
|
||||
record.setMid(apiResponse.getResponseData().getMid());
|
||||
record.setTxnId(apiResponse.getResponseData().getTxnId());
|
||||
record.setQrString(apiResponse.getResponseData().getQrString());
|
||||
record.setCreatedOn(apiResponse.getResponseData().getCreatedOn());
|
||||
|
||||
|
||||
|
||||
paymentStartRecordRepository.save(record);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user