This commit is contained in:
Mohd-Arham
2025-11-24 09:56:31 +05:30
parent bb38775e5b
commit 3a7a278774
10 changed files with 168 additions and 23 deletions
@@ -20,6 +20,7 @@ import com.billpaymentservice.bbps.dto.BillCustomerParamsDTO;
import com.billpaymentservice.bbps.dto.BillerIconDTO;
import com.billpaymentservice.bbps.dto.CheckClientBillerResponseDTO;
import com.billpaymentservice.bbps.dto.ComplaintHistoryDTO;
import com.billpaymentservice.bbps.dto.ContactMaster;
import com.billpaymentservice.bbps.dto.CustomerParamGroupsDTO;
import com.billpaymentservice.bbps.dto.Detail;
import com.billpaymentservice.bbps.dto.GroupDTO;
@@ -32,8 +33,8 @@ import com.billpaymentservice.bbps.dto.response.ClientReqIdResponse;
import com.billpaymentservice.bbps.dto.response.ComplaintHistoryStatusResponse;
import com.billpaymentservice.bbps.dto.response.PlanResponse;
import com.billpaymentservice.bbps.dto.response.TicketCheckStatusResponse;
import com.billpaymentservice.bbps.dto.response.ViewAllComplaintsTicketsResponse;
import com.billpaymentservice.bbps.dto.response.ViewAllComplaintsResponse;
import com.billpaymentservice.bbps.dto.response.ViewAllComplaintsTicketsResponse;
import com.billpaymentservice.bbps.dto.response.ViewComplainByIdResponse;
import com.billpaymentservice.bbps.entites.AdditionalInfoPlans;
import com.billpaymentservice.bbps.entites.AmountOptionByBillerId;
@@ -49,6 +50,7 @@ import com.billpaymentservice.bbps.entites.CheckClientStatusReqId;
import com.billpaymentservice.bbps.entites.ComplainStatus;
import com.billpaymentservice.bbps.entites.ComplaintHistory;
import com.billpaymentservice.bbps.entites.ComplaintStatusDetails;
import com.billpaymentservice.bbps.entites.ContactMasterData;
import com.billpaymentservice.bbps.entites.CustomerParamGroupById;
import com.billpaymentservice.bbps.entites.GroupParam;
import com.billpaymentservice.bbps.entites.Plan;
@@ -66,6 +68,7 @@ import com.billpaymentservice.bbps.repository.ClientReqIdRepository;
import com.billpaymentservice.bbps.repository.ComplainDetailRepository;
import com.billpaymentservice.bbps.repository.ComplaintHistoryRepository;
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.PlanResponseRepository;
@@ -92,6 +95,7 @@ public class BillerMapperHelper {
private final ComplainDetailRepository complainDetailRepository;
private final CheckClientBillerDataRepository checkClientBillerDataRepository;
private final ViewAllComplainTicketDetailRepository viewAllComplainTicketDetailRepository;
private final ContactMasterDataRepository contactMasterDataRepository;
public BillerMapperHelper(BillerCategoryWiseRepository billerRepo,
CustomerParamGroupByBillerIdRepository customerParamGroupByBillerIdRepo,
@@ -104,7 +108,8 @@ public class BillerMapperHelper {
ClientReqIdRepository clientReqIdRepository,
CheckClientBillerDataRepository checkClientBillerDataRepository,
TicketDispositionRepository ticketDispositionRepository,
ViewAllComplainTicketDetailRepository viewAllComplainTicketDetailRepository) {
ViewAllComplainTicketDetailRepository viewAllComplainTicketDetailRepository,
ContactMasterDataRepository contactMasterDataRepository) {
this.billerRepo = billerRepo;
this.customerParamGroupByBillerIdRepo = customerParamGroupByBillerIdRepo;
this.amountOptionByBillerIdRepository = amountOptionByBillerIdRepository;
@@ -119,6 +124,7 @@ public class BillerMapperHelper {
this.checkClientBillerDataRepository = checkClientBillerDataRepository;
this.ticketDispositionRepository = ticketDispositionRepository;
this.viewAllComplainTicketDetailRepository = viewAllComplainTicketDetailRepository;
this.contactMasterDataRepository = contactMasterDataRepository;
}
/**
@@ -794,4 +800,26 @@ public class BillerMapperHelper {
return "SUCCESS";
}
public String saveContactMasterData(List<ContactMaster> contactMasterList, String requestId, String txnID) {
if (contactMasterList == null || contactMasterList.isEmpty()) {
return "No contact master data found";
}
// Convert DTO → Entity
List<ContactMasterData> entities = contactMasterList.stream().map(dto -> {
ContactMasterData entity = new ContactMasterData();
entity.setMobNo(dto.getMobNo());
entity.setReqId(requestId);
entity.setTxnId(txnID);
entity.setCreateDateTime(new Date());
return entity;
}).collect(Collectors.toList());
// Save list in DB
contactMasterDataRepository.saveAll(entities);
return "Contact Master Saved Successfully";
}
}