Browse Source

volunteer category wise count

master
AJITHKUMAR12 3 weeks ago
parent
commit
1aa890a045
  1. 9
      src/main/java/com/gcc/commissionerreview/configuration/DataSourceConfig.java
  2. 19
      src/main/java/com/gcc/commissionerreview/controller/VolunteerController.java
  3. 826
      src/main/java/com/gcc/commissionerreview/service/VolunteerService.java
  4. 4
      src/main/resources/application.properties

9
src/main/java/com/gcc/commissionerreview/configuration/DataSourceConfig.java

@ -17,11 +17,12 @@ import org.springframework.transaction.annotation.EnableTransactionManagement;
@EnableTransactionManagement
public class DataSourceConfig {
// private static String host = "localhost:3306";
// private static String dbpassword = "root";
private static String host = "localhost:3306";
private static String dbpassword = "root";
private static String host = "gcc-facial-db-instance-1.cf48eqcciziq.ap-south-1.rds.amazonaws.com:3306";
private static String dbpassword = "gcc-facial-password";
// private static String host =
// "gcc-facial-db-instance-1.cf48eqcciziq.ap-south-1.rds.amazonaws.com:3306";
// private static String dbpassword = "gcc-facial-password";
public static class MyDataSourceConfig {
@Primary

19
src/main/java/com/gcc/commissionerreview/controller/VolunteerController.java

@ -7,6 +7,7 @@ import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.http.MediaType;
import java.util.Map;
@ -17,7 +18,7 @@ public class VolunteerController {
@Autowired
private VolunteerService volunteerService;
@GetMapping("/overall-details")
@GetMapping(value = "/overall-details", produces = MediaType.APPLICATION_JSON_VALUE)
public ResponseEntity<Map<String, Object>> getOverallDetails() {
return volunteerService.getOverallDetails();
}
@ -56,7 +57,8 @@ public class VolunteerController {
public ResponseEntity<Map<String, Object>> getOverallPendingRequest() {
return volunteerService.getOverallPendingRequest();
}
/// //////////////////////////////////////
/// //////////////////////////////////////
@GetMapping("/zonewise-details")
public ResponseEntity<Map<String, Object>> getZonewiseDetails() {
return volunteerService.getZonewiseDetails();
@ -101,14 +103,23 @@ public class VolunteerController {
public ResponseEntity<Map<String, Object>> getZonewisePendingRequest(@RequestParam String zone) {
return volunteerService.getZonewisePendingRequest(zone);
}
/// ////////////////////////////////////
/// ////////////////////////////////////
@GetMapping("/wardwise-details")
public ResponseEntity<Map<String, Object>> getWardwiseDetails(@RequestParam String zone) {
return volunteerService.getWardwiseDetails(zone);
}
/// /////////////////////////////////////
/// /////////////////////////////////////
@GetMapping("/volunteer-details")
public ResponseEntity<Map<String, Object>> getVolunteerDetails(@RequestParam String zone) {
return volunteerService.getVolunteerDetails(zone);
}
/// /////////////////////////////////////
@GetMapping(value = "/categorywise-details", produces = MediaType.APPLICATION_JSON_VALUE)
public ResponseEntity<Map<String, Object>> getCategorywiseDetails(@RequestParam String zone) {
return volunteerService.getCategorywiseDetails(zone);
}
}

826
src/main/java/com/gcc/commissionerreview/service/VolunteerService.java
File diff suppressed because it is too large
View File

4
src/main/resources/application.properties

@ -1,2 +1,2 @@
spring.profiles.active=prod
#spring.profiles.active=dev
#spring.profiles.active=prod
spring.profiles.active=dev
Loading…
Cancel
Save