|
|
@ -4,6 +4,7 @@ package com.gcc.erppostdata.controller; |
|
|
import com.gcc.erppostdata.communityhall.CHPostData; |
|
|
import com.gcc.erppostdata.communityhall.CHPostData; |
|
|
import com.gcc.erppostdata.communityhall.CmhQueryBank; |
|
|
import com.gcc.erppostdata.communityhall.CmhQueryBank; |
|
|
import com.gcc.erppostdata.petregistration.PRPostData; |
|
|
import com.gcc.erppostdata.petregistration.PRPostData; |
|
|
|
|
|
import com.gcc.erppostdata.petregistration.PetQueryBank; |
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
import org.springframework.http.HttpStatus; |
|
|
import org.springframework.http.HttpStatus; |
|
|
import org.springframework.http.ResponseEntity; |
|
|
import org.springframework.http.ResponseEntity; |
|
|
@ -14,7 +15,7 @@ import org.springframework.web.bind.annotation.GetMapping; |
|
|
public class APIController { |
|
|
public class APIController { |
|
|
|
|
|
|
|
|
@Autowired |
|
|
@Autowired |
|
|
private PRPostData prPostData; |
|
|
|
|
|
|
|
|
private PetQueryBank prPostData; |
|
|
|
|
|
|
|
|
@Autowired |
|
|
@Autowired |
|
|
private CmhQueryBank chPostData; |
|
|
private CmhQueryBank chPostData; |
|
|
@ -23,7 +24,7 @@ public class APIController { |
|
|
@GetMapping("/peterpdata") |
|
|
@GetMapping("/peterpdata") |
|
|
public ResponseEntity<String> peterpdata() { |
|
|
public ResponseEntity<String> peterpdata() { |
|
|
try { |
|
|
try { |
|
|
// prPostData.fetpetData(); |
|
|
|
|
|
|
|
|
prPostData.PushAllData(); |
|
|
return ResponseEntity.ok("Pet data fetched and sent successfully."); |
|
|
return ResponseEntity.ok("Pet data fetched and sent successfully."); |
|
|
} catch (Exception e) { |
|
|
} catch (Exception e) { |
|
|
return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR) |
|
|
return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR) |
|
|
@ -35,7 +36,7 @@ public class APIController { |
|
|
public ResponseEntity<String> cherpdata() { |
|
|
public ResponseEntity<String> cherpdata() { |
|
|
try { |
|
|
try { |
|
|
|
|
|
|
|
|
chPostData.hourlyPushData(); |
|
|
|
|
|
|
|
|
chPostData.PushAllData(); |
|
|
|
|
|
|
|
|
return ResponseEntity.ok("Communityhall data fetched and sent successfully."); |
|
|
return ResponseEntity.ok("Communityhall data fetched and sent successfully."); |
|
|
} catch (Exception e) { |
|
|
} catch (Exception e) { |
|
|
|