10-11-2025

This commit is contained in:
Mohd-Arham
2025-11-10 10:11:26 +05:30
parent cfac612306
commit c67f222957
34 changed files with 1544 additions and 425 deletions
@@ -13,45 +13,37 @@ import com.billpaymentservice.bbps.service.AgentService;
@RestController
@RequestMapping("/agent")
@CrossOrigin(origins = "*")
public class AgentController {
private final AgentService agentService;
private final AgentService agentService;
public AgentController(AgentService agentService) {
this.agentService = agentService;
}
public AgentController(AgentService agentService) {
this.agentService = agentService;
}
/**
* Fetches bill details from external BBPS service
*/
@PostMapping(
value = "/requestBillFetch",
consumes = MediaType.APPLICATION_JSON_VALUE,
produces = MediaType.APPLICATION_JSON_VALUE
)
public ResponseEntity<ResponseModel> requestBillFetch(
@Validated @RequestBody FetchBillRequest fetchBillRequest) {
/**
* Fetches bill details from external BBPS service
*/
@PostMapping(value = "/requestBillFetch", consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE)
public ResponseEntity<ResponseModel> requestBillFetch(@Validated @RequestBody FetchBillRequest fetchBillRequest) {
ResponseModel response = agentService.initiateBillFetch(fetchBillRequest);
return ResponseEntity.ok(response);
}
/**
* Fetches bill details from external BBPS service
*/
@PostMapping(
value = "/fetchBillById",
consumes = MediaType.APPLICATION_JSON_VALUE,
produces = MediaType.APPLICATION_JSON_VALUE
)
public ResponseEntity<ResponseModel> fetchBillById(
@Validated @RequestBody BillFetchByBillIdRequest billFetchByBillIdRequest) {
ResponseModel response = agentService.initiateBillFetch(fetchBillRequest);
return ResponseEntity.ok(response);
}
ResponseModel response = agentService.fetchBillById(billFetchByBillIdRequest);
return ResponseEntity.ok(response);
}
/**
/**
* Fetches bill details from external BBPS service
*/
@PostMapping(value = "/fetchBillById", consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE)
public ResponseEntity<ResponseModel> fetchBillById(
@Validated @RequestBody BillFetchByBillIdRequest billFetchByBillIdRequest) {
ResponseModel response = agentService.fetchBillById(billFetchByBillIdRequest);
return ResponseEntity.ok(response);
}
/**
* Fetches bill details validate from external BBPS service
*/
@PostMapping(value = "/requestBillValidate", consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE)
@@ -66,7 +58,8 @@ public class AgentController {
* Fetches bill details by bill Id from external BBPS service
*/
@PostMapping(value = "/requestBillValidateByBillId", consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE)
public ResponseEntity<ResponseModel> requestBillByBillId(@Validated @RequestBody BillFetchByBillIdRequest billRequest) {
public ResponseEntity<ResponseModel> requestBillByBillId(
@Validated @RequestBody BillFetchByBillIdRequest billRequest) {
ResponseModel response = agentService.initiateBillValidateByBillId(billRequest);
return ResponseEntity.ok(response);
@@ -5,6 +5,7 @@ import org.slf4j.LoggerFactory;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
@@ -25,6 +26,7 @@ import jakarta.validation.Valid;
@RequestMapping("/masterData")
@RestController
@Validated
@CrossOrigin(origins="*")
public class MasterDataController {
private static final Logger log = LoggerFactory.getLogger(MasterDataController.class);
@@ -74,7 +76,7 @@ public class MasterDataController {
}
/**
* Get All Master Data .The parameter is different from the data we are getting
* Get All Master Data .The parameter is different from the data we are getting Made By Arham
* in the MasterRequest
**/
@PostMapping("/getAllMastersData")
@@ -82,14 +84,14 @@ public class MasterDataController {
return masterDataService.getMasterData(masterRequest);
}
/** POST Master Category Wise API Fetch Category Wise from BBPS URL **/
/** POST Master CategoryResponseList Wise API Fetch CategoryResponseList Wise from BBPS URL Made By Arham **/
@PostMapping(value = "/getMasterCategoryWise", consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE)
public ResponseEntity<ResponseModel> getMasterDataCategoryWise(
@Validated @RequestBody MasterCategoryRequest masterRequest) {
@Valid @RequestBody MasterCategoryRequest masterRequest) {
return ResponseEntity.ok(masterDataService.fetchMasterDataCategoryWise(masterRequest));
}
/** POST Customer Param Groups API Fetch Category Wise from BBPS URL **/
/** POST Customer Param Groups API Fetch CategoryResponseList Wise from BBPS URL Made By Arham**/
@PostMapping(value = "/customerParamGroupsByBillerId", consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE)
public ResponseEntity<ResponseModel> getCustomerParamGroup(
@Validated @RequestBody BillerDetailRequest requestModel) {
@@ -97,8 +99,8 @@ public class MasterDataController {
}
/**
* POST Fetch All AMount Options By Biller Id API Fetch Category Wise from BBPS
* URL
* POST Fetch All AMount Options By Biller Id API Fetch CategoryResponseList Wise from BBPS
* URL Made By Arham
**/
@PostMapping(value = "/fetchAmountOptionsByBillerId", consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE)
public ResponseEntity<ResponseModel> fetchAllMasterAmountOptionsByBillerId(
@@ -107,8 +109,8 @@ public class MasterDataController {
}
/**
* POST Fetch All AMount Options By Biller Id API Fetch Category Wise from BBPS
* URL
* POST Fetch All AMount Options By Biller Id API Fetch CategoryResponseList Wise from BBPS
* URL Made By Arham
**/
@PostMapping(value = "/fetchAllPlanCategoriesByBillerId", consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE)
public ResponseEntity<ResponseModel> fetchPlanCategories(@Validated @RequestBody BillerDetailRequest requestModel) {
@@ -116,7 +118,7 @@ public class MasterDataController {
}
/**
* POST Fetch Initiating Channel API Fetch Category Wise from BBPS URL
* POST Fetch Initiating Channel API Fetch CategoryResponseList Wise from BBPS URL Made By Arham
**/
@PostMapping(value = "/initiatingChannel", consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE)
public ResponseEntity<ResponseModel> initiatingChannel(@Validated @RequestBody BillerDetailRequest requestModel) {
@@ -124,7 +126,7 @@ public class MasterDataController {
}
/**
* POST Fetch All AMount Options By Biller Id API Fetch Category Wise from BBPS
* POST Fetch All AMount Options By Biller Id API Fetch CategoryResponseList Wise from BBPS Made By Arham
* URL
**/
@PostMapping(value = "/fetchPlanByCategoryName", consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE)