diff --git a/testflutter3-back-b/authsec_springboot/backend/src/main/java/com/realnet/Builders/Services/BuilderService.java b/testflutter3-back-b/authsec_springboot/backend/src/main/java/com/realnet/Builders/Services/BuilderService.java index 11edc5f..acab012 100644 --- a/testflutter3-back-b/authsec_springboot/backend/src/main/java/com/realnet/Builders/Services/BuilderService.java +++ b/testflutter3-back-b/authsec_springboot/backend/src/main/java/com/realnet/Builders/Services/BuilderService.java @@ -69,6 +69,24 @@ public class BuilderService { executeDump(true); // ADD OTHER SERVICE +addCustomMenu( "T55", "Transcations"); + + +addCustomMenu( "Test44", "Transcations"); + + +addCustomMenu( "Test33", "Transcations"); + + +addCustomMenu( "Test1234", "Transcations"); + + +addCustomMenu( "Test22", "Transcations"); + + +addCustomMenu( "Tesrt", "Transcations"); + + System.out.println("dashboard and menu inserted..."); diff --git a/testflutter3-back-b/authsec_springboot/backend/src/main/java/com/realnet/forma/Controllers/TesrtController.java b/testflutter3-back-b/authsec_springboot/backend/src/main/java/com/realnet/forma/Controllers/TesrtController.java new file mode 100644 index 0000000..14ae56b --- /dev/null +++ b/testflutter3-back-b/authsec_springboot/backend/src/main/java/com/realnet/forma/Controllers/TesrtController.java @@ -0,0 +1,99 @@ +package com.realnet.forma.Controllers; +import java.util.List; +import org.springframework.beans.factory.annotation.Autowired; + import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; +import com.fasterxml.jackson.core.JsonProcessingException; +import org.springframework.web.bind.annotation.CrossOrigin; +import com.fasterxml.jackson.databind.JsonMappingException; +import com.realnet.config.EmailService; +import com.realnet.users.entity1.AppUser; +import com.realnet.users.service1.AppUserServiceImpl; +import com.fasterxml.jackson.databind.ObjectMapper; +import org.springframework.data.domain.Page; +import org.springframework.data.domain.PageRequest; +import org.springframework.http.ResponseEntity; +import org.springframework.data.domain.Pageable; +import org.springframework.beans.factory.annotation.*; +import com.realnet.forma.Entity.Tesrt; +import com.realnet.forma.Services.TesrtService ; + + + + + + +@RequestMapping(value = "/Tesrt") + @CrossOrigin("*") +@RestController +public class TesrtController { + @Autowired + private TesrtService Service; + +@Value("${projectPath}") + private String projectPath; + + + + + + + + @PostMapping("/Tesrt") + public Tesrt Savedata(@RequestBody Tesrt data) { + Tesrt save = Service.Savedata(data) ; + + + + + + System.out.println("data saved..." + save); + + return save; + } +@PutMapping("/Tesrt/{id}") + public Tesrt update(@RequestBody Tesrt data,@PathVariable Integer id ) { + Tesrt update = Service.update(data,id); + System.out.println("data update..." + update); + return update; + } +// get all with pagination + @GetMapping("/Tesrt/getall/page") + public Page getall(@RequestParam(value = "page", required = false) Integer page, + @RequestParam(value = "size", required = false) Integer size) { + Pageable paging = PageRequest.of(page, size); + Page get = Service.getAllWithPagination(paging); + + return get; + + } + @GetMapping("/Tesrt") + public List getdetails() { + List get = Service.getdetails(); + return get; +} +// get all without authentication + + @GetMapping("/token/Tesrt") + public List getallwioutsec() { + List get = Service.getdetails(); + return get; +} +@GetMapping("/Tesrt/{id}") + public Tesrt getdetailsbyId(@PathVariable Integer id ) { + Tesrt get = Service.getdetailsbyId(id); + return get; + } +@DeleteMapping("/Tesrt/{id}") + public void delete_by_id(@PathVariable Integer id ) { + Service.delete_by_id(id); + + } + + + + + + + +} \ No newline at end of file diff --git a/testflutter3-back-b/authsec_springboot/backend/src/main/java/com/realnet/forma/Entity/Tesrt.java b/testflutter3-back-b/authsec_springboot/backend/src/main/java/com/realnet/forma/Entity/Tesrt.java new file mode 100644 index 0000000..272a039 --- /dev/null +++ b/testflutter3-back-b/authsec_springboot/backend/src/main/java/com/realnet/forma/Entity/Tesrt.java @@ -0,0 +1,34 @@ +package com.realnet.forma.Entity; + import lombok.*; +import com.realnet.WhoColumn.Entity.Extension; + import javax.persistence.*; + import java.time.LocalDateTime; + import java.util.*; + + + + + + + + @Entity + @Data + public class Tesrt extends Extension { + /** + * + */ + private static final long serialVersionUID = 1L; + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + private Integer id; + +private String name; + +@Column(length = 2000) +private String description; + +private boolean active; + + +} diff --git a/testflutter3-back-b/authsec_springboot/backend/src/main/java/com/realnet/forma/Repository/TesrtRepository.java b/testflutter3-back-b/authsec_springboot/backend/src/main/java/com/realnet/forma/Repository/TesrtRepository.java new file mode 100644 index 0000000..083cfca --- /dev/null +++ b/testflutter3-back-b/authsec_springboot/backend/src/main/java/com/realnet/forma/Repository/TesrtRepository.java @@ -0,0 +1,30 @@ +package com.realnet.forma.Repository; + + +import org.springframework.data.domain.Page; +import org.springframework.data.domain.Pageable; +import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.data.jpa.repository.Query; + +import org.springframework.stereotype.Repository; +import java.util.*; + + + + + + + + + +import com.realnet.forma.Entity.Tesrt; + +@Repository +public interface TesrtRepository extends JpaRepository { + +@Query(value = "select * from tesrt where created_by=?1", nativeQuery = true) + List findAll(Long creayedBy); + +@Query(value = "select * from tesrt where created_by=?1", nativeQuery = true) + Page findAll(Pageable page, Long creayedBy); +} \ No newline at end of file diff --git a/testflutter3-back-b/authsec_springboot/backend/src/main/java/com/realnet/forma/Services/TesrtService.java b/testflutter3-back-b/authsec_springboot/backend/src/main/java/com/realnet/forma/Services/TesrtService.java new file mode 100644 index 0000000..eebe6fd --- /dev/null +++ b/testflutter3-back-b/authsec_springboot/backend/src/main/java/com/realnet/forma/Services/TesrtService.java @@ -0,0 +1,94 @@ +package com.realnet.forma.Services; +import com.realnet.forma.Repository.TesrtRepository; +import com.realnet.forma.Entity.Tesrt;import java.util.List; +import java.util.ArrayList; + +import org.springframework.beans.factory.annotation.Autowired; +import com.realnet.SequenceGenerator.Service.SequenceService; +import com.realnet.Notification.Entity.NotificationService; +import org.springframework.data.domain.Page; +import com.realnet.realm.Entity.Realm; +import com.realnet.realm.Services.RealmService;import org.springframework.data.domain.Pageable; +import org.springframework.http.ResponseEntity; +import com.realnet.users.service1.AppUserServiceImpl; +import org.springframework.http.HttpStatus; +import com.realnet.users.entity1.AppUser; + + + + + + + import org.springframework.stereotype.Service; + +@Service + public class TesrtService { +@Autowired +private TesrtRepository Repository; + @Autowired + private AppUserServiceImpl userService; +@Autowired + private RealmService realmService; + + + + + +public Tesrt Savedata(Tesrt data) { + + + + + + + data.setUpdatedBy(getUser().getUserId()); + data.setCreatedBy(getUser().getUserId()); + data.setAccountId(getUser().getAccount().getAccount_id()); +Tesrt save = Repository.save(data); + return save; + } + + +// get all with pagination + public Page getAllWithPagination(Pageable page) { + return Repository.findAll(page, getUser().getUserId()); + } +public List getdetails() { + List realm = realmService.findByUserId(getUser().getUserId()); +List all = Repository.findAll(getUser().getUserId()); + + return all ; } + + +public Tesrt getdetailsbyId(Integer id) { + return Repository.findById(id).get(); + } + + + public void delete_by_id(Integer id) { + Repository.deleteById(id); +} + + +public Tesrt update(Tesrt data,Integer id) { + Tesrt old = Repository.findById(id).get(); +old.setName(data.getName()); + +old.setDescription(data.getDescription()); + +old.setActive (data.isActive()); + +final Tesrt test = Repository.save(old); + data.setUpdatedBy(getUser().getUserId()); + return test;} + + + + + + + public AppUser getUser() { + AppUser user = userService.getLoggedInUser(); + return user; + + }} diff --git a/testflutter3-back-b/authsec_springboot/backend/src/main/java/com/realnet/rrr/Controllers/Test44Controller.java b/testflutter3-back-b/authsec_springboot/backend/src/main/java/com/realnet/rrr/Controllers/Test44Controller.java new file mode 100644 index 0000000..5f956ad --- /dev/null +++ b/testflutter3-back-b/authsec_springboot/backend/src/main/java/com/realnet/rrr/Controllers/Test44Controller.java @@ -0,0 +1,99 @@ +package com.realnet.rrr.Controllers; +import java.util.List; +import org.springframework.beans.factory.annotation.Autowired; + import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; +import com.fasterxml.jackson.core.JsonProcessingException; +import org.springframework.web.bind.annotation.CrossOrigin; +import com.fasterxml.jackson.databind.JsonMappingException; +import com.realnet.config.EmailService; +import com.realnet.users.entity1.AppUser; +import com.realnet.users.service1.AppUserServiceImpl; +import com.fasterxml.jackson.databind.ObjectMapper; +import org.springframework.data.domain.Page; +import org.springframework.data.domain.PageRequest; +import org.springframework.http.ResponseEntity; +import org.springframework.data.domain.Pageable; +import org.springframework.beans.factory.annotation.*; +import com.realnet.rrr.Entity.Test44; +import com.realnet.rrr.Services.Test44Service ; + + + + + + +@RequestMapping(value = "/Test44") + @CrossOrigin("*") +@RestController +public class Test44Controller { + @Autowired + private Test44Service Service; + +@Value("${projectPath}") + private String projectPath; + + + + + + + + @PostMapping("/Test44") + public Test44 Savedata(@RequestBody Test44 data) { + Test44 save = Service.Savedata(data) ; + + + + + + System.out.println("data saved..." + save); + + return save; + } +@PutMapping("/Test44/{id}") + public Test44 update(@RequestBody Test44 data,@PathVariable Integer id ) { + Test44 update = Service.update(data,id); + System.out.println("data update..." + update); + return update; + } +// get all with pagination + @GetMapping("/Test44/getall/page") + public Page getall(@RequestParam(value = "page", required = false) Integer page, + @RequestParam(value = "size", required = false) Integer size) { + Pageable paging = PageRequest.of(page, size); + Page get = Service.getAllWithPagination(paging); + + return get; + + } + @GetMapping("/Test44") + public List getdetails() { + List get = Service.getdetails(); + return get; +} +// get all without authentication + + @GetMapping("/token/Test44") + public List getallwioutsec() { + List get = Service.getdetails(); + return get; +} +@GetMapping("/Test44/{id}") + public Test44 getdetailsbyId(@PathVariable Integer id ) { + Test44 get = Service.getdetailsbyId(id); + return get; + } +@DeleteMapping("/Test44/{id}") + public void delete_by_id(@PathVariable Integer id ) { + Service.delete_by_id(id); + + } + + + + + + + +} \ No newline at end of file diff --git a/testflutter3-back-b/authsec_springboot/backend/src/main/java/com/realnet/rrr/Entity/Test44.java b/testflutter3-back-b/authsec_springboot/backend/src/main/java/com/realnet/rrr/Entity/Test44.java new file mode 100644 index 0000000..f48d1d2 --- /dev/null +++ b/testflutter3-back-b/authsec_springboot/backend/src/main/java/com/realnet/rrr/Entity/Test44.java @@ -0,0 +1,34 @@ +package com.realnet.rrr.Entity; + import lombok.*; +import com.realnet.WhoColumn.Entity.Extension; + import javax.persistence.*; + import java.time.LocalDateTime; + import java.util.*; + + + + + + + + @Entity + @Data + public class Test44 extends Extension { + /** + * + */ + private static final long serialVersionUID = 1L; + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + private Integer id; + +private String name; + +@Column(length = 2000) +private String description; + +private boolean active; + + +} diff --git a/testflutter3-back-b/authsec_springboot/backend/src/main/java/com/realnet/rrr/Repository/Test44Repository.java b/testflutter3-back-b/authsec_springboot/backend/src/main/java/com/realnet/rrr/Repository/Test44Repository.java new file mode 100644 index 0000000..23ec4d6 --- /dev/null +++ b/testflutter3-back-b/authsec_springboot/backend/src/main/java/com/realnet/rrr/Repository/Test44Repository.java @@ -0,0 +1,30 @@ +package com.realnet.rrr.Repository; + + +import org.springframework.data.domain.Page; +import org.springframework.data.domain.Pageable; +import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.data.jpa.repository.Query; + +import org.springframework.stereotype.Repository; +import java.util.*; + + + + + + + + + +import com.realnet.rrr.Entity.Test44; + +@Repository +public interface Test44Repository extends JpaRepository { + +@Query(value = "select * from test44 where created_by=?1", nativeQuery = true) + List findAll(Long creayedBy); + +@Query(value = "select * from test44 where created_by=?1", nativeQuery = true) + Page findAll(Pageable page, Long creayedBy); +} \ No newline at end of file diff --git a/testflutter3-back-b/authsec_springboot/backend/src/main/java/com/realnet/rrr/Services/Test44Service.java b/testflutter3-back-b/authsec_springboot/backend/src/main/java/com/realnet/rrr/Services/Test44Service.java new file mode 100644 index 0000000..37326f8 --- /dev/null +++ b/testflutter3-back-b/authsec_springboot/backend/src/main/java/com/realnet/rrr/Services/Test44Service.java @@ -0,0 +1,94 @@ +package com.realnet.rrr.Services; +import com.realnet.rrr.Repository.Test44Repository; +import com.realnet.rrr.Entity.Test44;import java.util.List; +import java.util.ArrayList; + +import org.springframework.beans.factory.annotation.Autowired; +import com.realnet.SequenceGenerator.Service.SequenceService; +import com.realnet.Notification.Entity.NotificationService; +import org.springframework.data.domain.Page; +import com.realnet.realm.Entity.Realm; +import com.realnet.realm.Services.RealmService;import org.springframework.data.domain.Pageable; +import org.springframework.http.ResponseEntity; +import com.realnet.users.service1.AppUserServiceImpl; +import org.springframework.http.HttpStatus; +import com.realnet.users.entity1.AppUser; + + + + + + + import org.springframework.stereotype.Service; + +@Service + public class Test44Service { +@Autowired +private Test44Repository Repository; + @Autowired + private AppUserServiceImpl userService; +@Autowired + private RealmService realmService; + + + + + +public Test44 Savedata(Test44 data) { + + + + + + + data.setUpdatedBy(getUser().getUserId()); + data.setCreatedBy(getUser().getUserId()); + data.setAccountId(getUser().getAccount().getAccount_id()); +Test44 save = Repository.save(data); + return save; + } + + +// get all with pagination + public Page getAllWithPagination(Pageable page) { + return Repository.findAll(page, getUser().getUserId()); + } +public List getdetails() { + List realm = realmService.findByUserId(getUser().getUserId()); +List all = Repository.findAll(getUser().getUserId()); + + return all ; } + + +public Test44 getdetailsbyId(Integer id) { + return Repository.findById(id).get(); + } + + + public void delete_by_id(Integer id) { + Repository.deleteById(id); +} + + +public Test44 update(Test44 data,Integer id) { + Test44 old = Repository.findById(id).get(); +old.setName(data.getName()); + +old.setDescription(data.getDescription()); + +old.setActive (data.isActive()); + +final Test44 test = Repository.save(old); + data.setUpdatedBy(getUser().getUserId()); + return test;} + + + + + + + public AppUser getUser() { + AppUser user = userService.getLoggedInUser(); + return user; + + }} diff --git a/testflutter3-back-b/authsec_springboot/backend/src/main/java/com/realnet/test/Controllers/T55Controller.java b/testflutter3-back-b/authsec_springboot/backend/src/main/java/com/realnet/test/Controllers/T55Controller.java new file mode 100644 index 0000000..8e30725 --- /dev/null +++ b/testflutter3-back-b/authsec_springboot/backend/src/main/java/com/realnet/test/Controllers/T55Controller.java @@ -0,0 +1,99 @@ +package com.realnet.test.Controllers; +import java.util.List; +import org.springframework.beans.factory.annotation.Autowired; + import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; +import com.fasterxml.jackson.core.JsonProcessingException; +import org.springframework.web.bind.annotation.CrossOrigin; +import com.fasterxml.jackson.databind.JsonMappingException; +import com.realnet.config.EmailService; +import com.realnet.users.entity1.AppUser; +import com.realnet.users.service1.AppUserServiceImpl; +import com.fasterxml.jackson.databind.ObjectMapper; +import org.springframework.data.domain.Page; +import org.springframework.data.domain.PageRequest; +import org.springframework.http.ResponseEntity; +import org.springframework.data.domain.Pageable; +import org.springframework.beans.factory.annotation.*; +import com.realnet.test.Entity.T55; +import com.realnet.test.Services.T55Service ; + + + + + + +@RequestMapping(value = "/T55") + @CrossOrigin("*") +@RestController +public class T55Controller { + @Autowired + private T55Service Service; + +@Value("${projectPath}") + private String projectPath; + + + + + + + + @PostMapping("/T55") + public T55 Savedata(@RequestBody T55 data) { + T55 save = Service.Savedata(data) ; + + + + + + System.out.println("data saved..." + save); + + return save; + } +@PutMapping("/T55/{id}") + public T55 update(@RequestBody T55 data,@PathVariable Integer id ) { + T55 update = Service.update(data,id); + System.out.println("data update..." + update); + return update; + } +// get all with pagination + @GetMapping("/T55/getall/page") + public Page getall(@RequestParam(value = "page", required = false) Integer page, + @RequestParam(value = "size", required = false) Integer size) { + Pageable paging = PageRequest.of(page, size); + Page get = Service.getAllWithPagination(paging); + + return get; + + } + @GetMapping("/T55") + public List getdetails() { + List get = Service.getdetails(); + return get; +} +// get all without authentication + + @GetMapping("/token/T55") + public List getallwioutsec() { + List get = Service.getdetails(); + return get; +} +@GetMapping("/T55/{id}") + public T55 getdetailsbyId(@PathVariable Integer id ) { + T55 get = Service.getdetailsbyId(id); + return get; + } +@DeleteMapping("/T55/{id}") + public void delete_by_id(@PathVariable Integer id ) { + Service.delete_by_id(id); + + } + + + + + + + +} \ No newline at end of file diff --git a/testflutter3-back-b/authsec_springboot/backend/src/main/java/com/realnet/test/Controllers/Test1234Controller.java b/testflutter3-back-b/authsec_springboot/backend/src/main/java/com/realnet/test/Controllers/Test1234Controller.java new file mode 100644 index 0000000..ba69ce2 --- /dev/null +++ b/testflutter3-back-b/authsec_springboot/backend/src/main/java/com/realnet/test/Controllers/Test1234Controller.java @@ -0,0 +1,99 @@ +package com.realnet.test.Controllers; +import java.util.List; +import org.springframework.beans.factory.annotation.Autowired; + import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; +import com.fasterxml.jackson.core.JsonProcessingException; +import org.springframework.web.bind.annotation.CrossOrigin; +import com.fasterxml.jackson.databind.JsonMappingException; +import com.realnet.config.EmailService; +import com.realnet.users.entity1.AppUser; +import com.realnet.users.service1.AppUserServiceImpl; +import com.fasterxml.jackson.databind.ObjectMapper; +import org.springframework.data.domain.Page; +import org.springframework.data.domain.PageRequest; +import org.springframework.http.ResponseEntity; +import org.springframework.data.domain.Pageable; +import org.springframework.beans.factory.annotation.*; +import com.realnet.test.Entity.Test1234; +import com.realnet.test.Services.Test1234Service ; + + + + + + +@RequestMapping(value = "/Test1234") + @CrossOrigin("*") +@RestController +public class Test1234Controller { + @Autowired + private Test1234Service Service; + +@Value("${projectPath}") + private String projectPath; + + + + + + + + @PostMapping("/Test1234") + public Test1234 Savedata(@RequestBody Test1234 data) { + Test1234 save = Service.Savedata(data) ; + + + + + + System.out.println("data saved..." + save); + + return save; + } +@PutMapping("/Test1234/{id}") + public Test1234 update(@RequestBody Test1234 data,@PathVariable Integer id ) { + Test1234 update = Service.update(data,id); + System.out.println("data update..." + update); + return update; + } +// get all with pagination + @GetMapping("/Test1234/getall/page") + public Page getall(@RequestParam(value = "page", required = false) Integer page, + @RequestParam(value = "size", required = false) Integer size) { + Pageable paging = PageRequest.of(page, size); + Page get = Service.getAllWithPagination(paging); + + return get; + + } + @GetMapping("/Test1234") + public List getdetails() { + List get = Service.getdetails(); + return get; +} +// get all without authentication + + @GetMapping("/token/Test1234") + public List getallwioutsec() { + List get = Service.getdetails(); + return get; +} +@GetMapping("/Test1234/{id}") + public Test1234 getdetailsbyId(@PathVariable Integer id ) { + Test1234 get = Service.getdetailsbyId(id); + return get; + } +@DeleteMapping("/Test1234/{id}") + public void delete_by_id(@PathVariable Integer id ) { + Service.delete_by_id(id); + + } + + + + + + + +} \ No newline at end of file diff --git a/testflutter3-back-b/authsec_springboot/backend/src/main/java/com/realnet/test/Controllers/Test22Controller.java b/testflutter3-back-b/authsec_springboot/backend/src/main/java/com/realnet/test/Controllers/Test22Controller.java new file mode 100644 index 0000000..29772bb --- /dev/null +++ b/testflutter3-back-b/authsec_springboot/backend/src/main/java/com/realnet/test/Controllers/Test22Controller.java @@ -0,0 +1,99 @@ +package com.realnet.test.Controllers; +import java.util.List; +import org.springframework.beans.factory.annotation.Autowired; + import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; +import com.fasterxml.jackson.core.JsonProcessingException; +import org.springframework.web.bind.annotation.CrossOrigin; +import com.fasterxml.jackson.databind.JsonMappingException; +import com.realnet.config.EmailService; +import com.realnet.users.entity1.AppUser; +import com.realnet.users.service1.AppUserServiceImpl; +import com.fasterxml.jackson.databind.ObjectMapper; +import org.springframework.data.domain.Page; +import org.springframework.data.domain.PageRequest; +import org.springframework.http.ResponseEntity; +import org.springframework.data.domain.Pageable; +import org.springframework.beans.factory.annotation.*; +import com.realnet.test.Entity.Test22; +import com.realnet.test.Services.Test22Service ; + + + + + + +@RequestMapping(value = "/Test22") + @CrossOrigin("*") +@RestController +public class Test22Controller { + @Autowired + private Test22Service Service; + +@Value("${projectPath}") + private String projectPath; + + + + + + + + @PostMapping("/Test22") + public Test22 Savedata(@RequestBody Test22 data) { + Test22 save = Service.Savedata(data) ; + + + + + + System.out.println("data saved..." + save); + + return save; + } +@PutMapping("/Test22/{id}") + public Test22 update(@RequestBody Test22 data,@PathVariable Integer id ) { + Test22 update = Service.update(data,id); + System.out.println("data update..." + update); + return update; + } +// get all with pagination + @GetMapping("/Test22/getall/page") + public Page getall(@RequestParam(value = "page", required = false) Integer page, + @RequestParam(value = "size", required = false) Integer size) { + Pageable paging = PageRequest.of(page, size); + Page get = Service.getAllWithPagination(paging); + + return get; + + } + @GetMapping("/Test22") + public List getdetails() { + List get = Service.getdetails(); + return get; +} +// get all without authentication + + @GetMapping("/token/Test22") + public List getallwioutsec() { + List get = Service.getdetails(); + return get; +} +@GetMapping("/Test22/{id}") + public Test22 getdetailsbyId(@PathVariable Integer id ) { + Test22 get = Service.getdetailsbyId(id); + return get; + } +@DeleteMapping("/Test22/{id}") + public void delete_by_id(@PathVariable Integer id ) { + Service.delete_by_id(id); + + } + + + + + + + +} \ No newline at end of file diff --git a/testflutter3-back-b/authsec_springboot/backend/src/main/java/com/realnet/test/Entity/T55.java b/testflutter3-back-b/authsec_springboot/backend/src/main/java/com/realnet/test/Entity/T55.java new file mode 100644 index 0000000..0fb5d00 --- /dev/null +++ b/testflutter3-back-b/authsec_springboot/backend/src/main/java/com/realnet/test/Entity/T55.java @@ -0,0 +1,34 @@ +package com.realnet.test.Entity; + import lombok.*; +import com.realnet.WhoColumn.Entity.Extension; + import javax.persistence.*; + import java.time.LocalDateTime; + import java.util.*; + + + + + + + + @Entity + @Data + public class T55 extends Extension { + /** + * + */ + private static final long serialVersionUID = 1L; + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + private Integer id; + +private String name; + +@Column(length = 2000) +private String description; + +private boolean active; + + +} diff --git a/testflutter3-back-b/authsec_springboot/backend/src/main/java/com/realnet/test/Entity/Test1234.java b/testflutter3-back-b/authsec_springboot/backend/src/main/java/com/realnet/test/Entity/Test1234.java new file mode 100644 index 0000000..e1ab2e6 --- /dev/null +++ b/testflutter3-back-b/authsec_springboot/backend/src/main/java/com/realnet/test/Entity/Test1234.java @@ -0,0 +1,34 @@ +package com.realnet.test.Entity; + import lombok.*; +import com.realnet.WhoColumn.Entity.Extension; + import javax.persistence.*; + import java.time.LocalDateTime; + import java.util.*; + + + + + + + + @Entity + @Data + public class Test1234 extends Extension { + /** + * + */ + private static final long serialVersionUID = 1L; + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + private Integer id; + +private String name; + +@Column(length = 2000) +private String description; + +private boolean active; + + +} diff --git a/testflutter3-back-b/authsec_springboot/backend/src/main/java/com/realnet/test/Entity/Test22.java b/testflutter3-back-b/authsec_springboot/backend/src/main/java/com/realnet/test/Entity/Test22.java new file mode 100644 index 0000000..9a57216 --- /dev/null +++ b/testflutter3-back-b/authsec_springboot/backend/src/main/java/com/realnet/test/Entity/Test22.java @@ -0,0 +1,34 @@ +package com.realnet.test.Entity; + import lombok.*; +import com.realnet.WhoColumn.Entity.Extension; + import javax.persistence.*; + import java.time.LocalDateTime; + import java.util.*; + + + + + + + + @Entity + @Data + public class Test22 extends Extension { + /** + * + */ + private static final long serialVersionUID = 1L; + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + private Integer id; + +private String name; + +@Column(length = 2000) +private String description; + +private boolean active; + + +} diff --git a/testflutter3-back-b/authsec_springboot/backend/src/main/java/com/realnet/test/Repository/T55Repository.java b/testflutter3-back-b/authsec_springboot/backend/src/main/java/com/realnet/test/Repository/T55Repository.java new file mode 100644 index 0000000..1a07b4d --- /dev/null +++ b/testflutter3-back-b/authsec_springboot/backend/src/main/java/com/realnet/test/Repository/T55Repository.java @@ -0,0 +1,30 @@ +package com.realnet.test.Repository; + + +import org.springframework.data.domain.Page; +import org.springframework.data.domain.Pageable; +import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.data.jpa.repository.Query; + +import org.springframework.stereotype.Repository; +import java.util.*; + + + + + + + + + +import com.realnet.test.Entity.T55; + +@Repository +public interface T55Repository extends JpaRepository { + +@Query(value = "select * from t55 where created_by=?1", nativeQuery = true) + List findAll(Long creayedBy); + +@Query(value = "select * from t55 where created_by=?1", nativeQuery = true) + Page findAll(Pageable page, Long creayedBy); +} \ No newline at end of file diff --git a/testflutter3-back-b/authsec_springboot/backend/src/main/java/com/realnet/test/Repository/Test1234Repository.java b/testflutter3-back-b/authsec_springboot/backend/src/main/java/com/realnet/test/Repository/Test1234Repository.java new file mode 100644 index 0000000..f54897b --- /dev/null +++ b/testflutter3-back-b/authsec_springboot/backend/src/main/java/com/realnet/test/Repository/Test1234Repository.java @@ -0,0 +1,30 @@ +package com.realnet.test.Repository; + + +import org.springframework.data.domain.Page; +import org.springframework.data.domain.Pageable; +import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.data.jpa.repository.Query; + +import org.springframework.stereotype.Repository; +import java.util.*; + + + + + + + + + +import com.realnet.test.Entity.Test1234; + +@Repository +public interface Test1234Repository extends JpaRepository { + +@Query(value = "select * from test1234 where created_by=?1", nativeQuery = true) + List findAll(Long creayedBy); + +@Query(value = "select * from test1234 where created_by=?1", nativeQuery = true) + Page findAll(Pageable page, Long creayedBy); +} \ No newline at end of file diff --git a/testflutter3-back-b/authsec_springboot/backend/src/main/java/com/realnet/test/Repository/Test22Repository.java b/testflutter3-back-b/authsec_springboot/backend/src/main/java/com/realnet/test/Repository/Test22Repository.java new file mode 100644 index 0000000..f3d6977 --- /dev/null +++ b/testflutter3-back-b/authsec_springboot/backend/src/main/java/com/realnet/test/Repository/Test22Repository.java @@ -0,0 +1,30 @@ +package com.realnet.test.Repository; + + +import org.springframework.data.domain.Page; +import org.springframework.data.domain.Pageable; +import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.data.jpa.repository.Query; + +import org.springframework.stereotype.Repository; +import java.util.*; + + + + + + + + + +import com.realnet.test.Entity.Test22; + +@Repository +public interface Test22Repository extends JpaRepository { + +@Query(value = "select * from test22 where created_by=?1", nativeQuery = true) + List findAll(Long creayedBy); + +@Query(value = "select * from test22 where created_by=?1", nativeQuery = true) + Page findAll(Pageable page, Long creayedBy); +} \ No newline at end of file diff --git a/testflutter3-back-b/authsec_springboot/backend/src/main/java/com/realnet/test/Services/T55Service.java b/testflutter3-back-b/authsec_springboot/backend/src/main/java/com/realnet/test/Services/T55Service.java new file mode 100644 index 0000000..c697ca3 --- /dev/null +++ b/testflutter3-back-b/authsec_springboot/backend/src/main/java/com/realnet/test/Services/T55Service.java @@ -0,0 +1,94 @@ +package com.realnet.test.Services; +import com.realnet.test.Repository.T55Repository; +import com.realnet.test.Entity.T55;import java.util.List; +import java.util.ArrayList; + +import org.springframework.beans.factory.annotation.Autowired; +import com.realnet.SequenceGenerator.Service.SequenceService; +import com.realnet.Notification.Entity.NotificationService; +import org.springframework.data.domain.Page; +import com.realnet.realm.Entity.Realm; +import com.realnet.realm.Services.RealmService;import org.springframework.data.domain.Pageable; +import org.springframework.http.ResponseEntity; +import com.realnet.users.service1.AppUserServiceImpl; +import org.springframework.http.HttpStatus; +import com.realnet.users.entity1.AppUser; + + + + + + + import org.springframework.stereotype.Service; + +@Service + public class T55Service { +@Autowired +private T55Repository Repository; + @Autowired + private AppUserServiceImpl userService; +@Autowired + private RealmService realmService; + + + + + +public T55 Savedata(T55 data) { + + + + + + + data.setUpdatedBy(getUser().getUserId()); + data.setCreatedBy(getUser().getUserId()); + data.setAccountId(getUser().getAccount().getAccount_id()); +T55 save = Repository.save(data); + return save; + } + + +// get all with pagination + public Page getAllWithPagination(Pageable page) { + return Repository.findAll(page, getUser().getUserId()); + } +public List getdetails() { + List realm = realmService.findByUserId(getUser().getUserId()); +List all = Repository.findAll(getUser().getUserId()); + + return all ; } + + +public T55 getdetailsbyId(Integer id) { + return Repository.findById(id).get(); + } + + + public void delete_by_id(Integer id) { + Repository.deleteById(id); +} + + +public T55 update(T55 data,Integer id) { + T55 old = Repository.findById(id).get(); +old.setName(data.getName()); + +old.setDescription(data.getDescription()); + +old.setActive (data.isActive()); + +final T55 test = Repository.save(old); + data.setUpdatedBy(getUser().getUserId()); + return test;} + + + + + + + public AppUser getUser() { + AppUser user = userService.getLoggedInUser(); + return user; + + }} diff --git a/testflutter3-back-b/authsec_springboot/backend/src/main/java/com/realnet/test/Services/Test1234Service.java b/testflutter3-back-b/authsec_springboot/backend/src/main/java/com/realnet/test/Services/Test1234Service.java new file mode 100644 index 0000000..073f901 --- /dev/null +++ b/testflutter3-back-b/authsec_springboot/backend/src/main/java/com/realnet/test/Services/Test1234Service.java @@ -0,0 +1,94 @@ +package com.realnet.test.Services; +import com.realnet.test.Repository.Test1234Repository; +import com.realnet.test.Entity.Test1234;import java.util.List; +import java.util.ArrayList; + +import org.springframework.beans.factory.annotation.Autowired; +import com.realnet.SequenceGenerator.Service.SequenceService; +import com.realnet.Notification.Entity.NotificationService; +import org.springframework.data.domain.Page; +import com.realnet.realm.Entity.Realm; +import com.realnet.realm.Services.RealmService;import org.springframework.data.domain.Pageable; +import org.springframework.http.ResponseEntity; +import com.realnet.users.service1.AppUserServiceImpl; +import org.springframework.http.HttpStatus; +import com.realnet.users.entity1.AppUser; + + + + + + + import org.springframework.stereotype.Service; + +@Service + public class Test1234Service { +@Autowired +private Test1234Repository Repository; + @Autowired + private AppUserServiceImpl userService; +@Autowired + private RealmService realmService; + + + + + +public Test1234 Savedata(Test1234 data) { + + + + + + + data.setUpdatedBy(getUser().getUserId()); + data.setCreatedBy(getUser().getUserId()); + data.setAccountId(getUser().getAccount().getAccount_id()); +Test1234 save = Repository.save(data); + return save; + } + + +// get all with pagination + public Page getAllWithPagination(Pageable page) { + return Repository.findAll(page, getUser().getUserId()); + } +public List getdetails() { + List realm = realmService.findByUserId(getUser().getUserId()); +List all = Repository.findAll(getUser().getUserId()); + + return all ; } + + +public Test1234 getdetailsbyId(Integer id) { + return Repository.findById(id).get(); + } + + + public void delete_by_id(Integer id) { + Repository.deleteById(id); +} + + +public Test1234 update(Test1234 data,Integer id) { + Test1234 old = Repository.findById(id).get(); +old.setName(data.getName()); + +old.setDescription(data.getDescription()); + +old.setActive (data.isActive()); + +final Test1234 test = Repository.save(old); + data.setUpdatedBy(getUser().getUserId()); + return test;} + + + + + + + public AppUser getUser() { + AppUser user = userService.getLoggedInUser(); + return user; + + }} diff --git a/testflutter3-back-b/authsec_springboot/backend/src/main/java/com/realnet/test/Services/Test22Service.java b/testflutter3-back-b/authsec_springboot/backend/src/main/java/com/realnet/test/Services/Test22Service.java new file mode 100644 index 0000000..1305bd6 --- /dev/null +++ b/testflutter3-back-b/authsec_springboot/backend/src/main/java/com/realnet/test/Services/Test22Service.java @@ -0,0 +1,94 @@ +package com.realnet.test.Services; +import com.realnet.test.Repository.Test22Repository; +import com.realnet.test.Entity.Test22;import java.util.List; +import java.util.ArrayList; + +import org.springframework.beans.factory.annotation.Autowired; +import com.realnet.SequenceGenerator.Service.SequenceService; +import com.realnet.Notification.Entity.NotificationService; +import org.springframework.data.domain.Page; +import com.realnet.realm.Entity.Realm; +import com.realnet.realm.Services.RealmService;import org.springframework.data.domain.Pageable; +import org.springframework.http.ResponseEntity; +import com.realnet.users.service1.AppUserServiceImpl; +import org.springframework.http.HttpStatus; +import com.realnet.users.entity1.AppUser; + + + + + + + import org.springframework.stereotype.Service; + +@Service + public class Test22Service { +@Autowired +private Test22Repository Repository; + @Autowired + private AppUserServiceImpl userService; +@Autowired + private RealmService realmService; + + + + + +public Test22 Savedata(Test22 data) { + + + + + + + data.setUpdatedBy(getUser().getUserId()); + data.setCreatedBy(getUser().getUserId()); + data.setAccountId(getUser().getAccount().getAccount_id()); +Test22 save = Repository.save(data); + return save; + } + + +// get all with pagination + public Page getAllWithPagination(Pageable page) { + return Repository.findAll(page, getUser().getUserId()); + } +public List getdetails() { + List realm = realmService.findByUserId(getUser().getUserId()); +List all = Repository.findAll(getUser().getUserId()); + + return all ; } + + +public Test22 getdetailsbyId(Integer id) { + return Repository.findById(id).get(); + } + + + public void delete_by_id(Integer id) { + Repository.deleteById(id); +} + + +public Test22 update(Test22 data,Integer id) { + Test22 old = Repository.findById(id).get(); +old.setName(data.getName()); + +old.setDescription(data.getDescription()); + +old.setActive (data.isActive()); + +final Test22 test = Repository.save(old); + data.setUpdatedBy(getUser().getUserId()); + return test;} + + + + + + + public AppUser getUser() { + AppUser user = userService.getLoggedInUser(); + return user; + + }} diff --git a/testflutter3-back-b/authsec_springboot/backend/src/main/java/com/realnet/ttt/Controllers/Test33Controller.java b/testflutter3-back-b/authsec_springboot/backend/src/main/java/com/realnet/ttt/Controllers/Test33Controller.java new file mode 100644 index 0000000..6b28dd2 --- /dev/null +++ b/testflutter3-back-b/authsec_springboot/backend/src/main/java/com/realnet/ttt/Controllers/Test33Controller.java @@ -0,0 +1,99 @@ +package com.realnet.ttt.Controllers; +import java.util.List; +import org.springframework.beans.factory.annotation.Autowired; + import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; +import com.fasterxml.jackson.core.JsonProcessingException; +import org.springframework.web.bind.annotation.CrossOrigin; +import com.fasterxml.jackson.databind.JsonMappingException; +import com.realnet.config.EmailService; +import com.realnet.users.entity1.AppUser; +import com.realnet.users.service1.AppUserServiceImpl; +import com.fasterxml.jackson.databind.ObjectMapper; +import org.springframework.data.domain.Page; +import org.springframework.data.domain.PageRequest; +import org.springframework.http.ResponseEntity; +import org.springframework.data.domain.Pageable; +import org.springframework.beans.factory.annotation.*; +import com.realnet.ttt.Entity.Test33; +import com.realnet.ttt.Services.Test33Service ; + + + + + + +@RequestMapping(value = "/Test33") + @CrossOrigin("*") +@RestController +public class Test33Controller { + @Autowired + private Test33Service Service; + +@Value("${projectPath}") + private String projectPath; + + + + + + + + @PostMapping("/Test33") + public Test33 Savedata(@RequestBody Test33 data) { + Test33 save = Service.Savedata(data) ; + + + + + + System.out.println("data saved..." + save); + + return save; + } +@PutMapping("/Test33/{id}") + public Test33 update(@RequestBody Test33 data,@PathVariable Integer id ) { + Test33 update = Service.update(data,id); + System.out.println("data update..." + update); + return update; + } +// get all with pagination + @GetMapping("/Test33/getall/page") + public Page getall(@RequestParam(value = "page", required = false) Integer page, + @RequestParam(value = "size", required = false) Integer size) { + Pageable paging = PageRequest.of(page, size); + Page get = Service.getAllWithPagination(paging); + + return get; + + } + @GetMapping("/Test33") + public List getdetails() { + List get = Service.getdetails(); + return get; +} +// get all without authentication + + @GetMapping("/token/Test33") + public List getallwioutsec() { + List get = Service.getdetails(); + return get; +} +@GetMapping("/Test33/{id}") + public Test33 getdetailsbyId(@PathVariable Integer id ) { + Test33 get = Service.getdetailsbyId(id); + return get; + } +@DeleteMapping("/Test33/{id}") + public void delete_by_id(@PathVariable Integer id ) { + Service.delete_by_id(id); + + } + + + + + + + +} \ No newline at end of file diff --git a/testflutter3-back-b/authsec_springboot/backend/src/main/java/com/realnet/ttt/Entity/Test33.java b/testflutter3-back-b/authsec_springboot/backend/src/main/java/com/realnet/ttt/Entity/Test33.java new file mode 100644 index 0000000..60fd76b --- /dev/null +++ b/testflutter3-back-b/authsec_springboot/backend/src/main/java/com/realnet/ttt/Entity/Test33.java @@ -0,0 +1,34 @@ +package com.realnet.ttt.Entity; + import lombok.*; +import com.realnet.WhoColumn.Entity.Extension; + import javax.persistence.*; + import java.time.LocalDateTime; + import java.util.*; + + + + + + + + @Entity + @Data + public class Test33 extends Extension { + /** + * + */ + private static final long serialVersionUID = 1L; + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + private Integer id; + +private String name; + +@Column(length = 2000) +private String description; + +private boolean active; + + +} diff --git a/testflutter3-back-b/authsec_springboot/backend/src/main/java/com/realnet/ttt/Repository/Test33Repository.java b/testflutter3-back-b/authsec_springboot/backend/src/main/java/com/realnet/ttt/Repository/Test33Repository.java new file mode 100644 index 0000000..9b1688b --- /dev/null +++ b/testflutter3-back-b/authsec_springboot/backend/src/main/java/com/realnet/ttt/Repository/Test33Repository.java @@ -0,0 +1,30 @@ +package com.realnet.ttt.Repository; + + +import org.springframework.data.domain.Page; +import org.springframework.data.domain.Pageable; +import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.data.jpa.repository.Query; + +import org.springframework.stereotype.Repository; +import java.util.*; + + + + + + + + + +import com.realnet.ttt.Entity.Test33; + +@Repository +public interface Test33Repository extends JpaRepository { + +@Query(value = "select * from test33 where created_by=?1", nativeQuery = true) + List findAll(Long creayedBy); + +@Query(value = "select * from test33 where created_by=?1", nativeQuery = true) + Page findAll(Pageable page, Long creayedBy); +} \ No newline at end of file diff --git a/testflutter3-back-b/authsec_springboot/backend/src/main/java/com/realnet/ttt/Services/Test33Service.java b/testflutter3-back-b/authsec_springboot/backend/src/main/java/com/realnet/ttt/Services/Test33Service.java new file mode 100644 index 0000000..7f07ea6 --- /dev/null +++ b/testflutter3-back-b/authsec_springboot/backend/src/main/java/com/realnet/ttt/Services/Test33Service.java @@ -0,0 +1,94 @@ +package com.realnet.ttt.Services; +import com.realnet.ttt.Repository.Test33Repository; +import com.realnet.ttt.Entity.Test33;import java.util.List; +import java.util.ArrayList; + +import org.springframework.beans.factory.annotation.Autowired; +import com.realnet.SequenceGenerator.Service.SequenceService; +import com.realnet.Notification.Entity.NotificationService; +import org.springframework.data.domain.Page; +import com.realnet.realm.Entity.Realm; +import com.realnet.realm.Services.RealmService;import org.springframework.data.domain.Pageable; +import org.springframework.http.ResponseEntity; +import com.realnet.users.service1.AppUserServiceImpl; +import org.springframework.http.HttpStatus; +import com.realnet.users.entity1.AppUser; + + + + + + + import org.springframework.stereotype.Service; + +@Service + public class Test33Service { +@Autowired +private Test33Repository Repository; + @Autowired + private AppUserServiceImpl userService; +@Autowired + private RealmService realmService; + + + + + +public Test33 Savedata(Test33 data) { + + + + + + + data.setUpdatedBy(getUser().getUserId()); + data.setCreatedBy(getUser().getUserId()); + data.setAccountId(getUser().getAccount().getAccount_id()); +Test33 save = Repository.save(data); + return save; + } + + +// get all with pagination + public Page getAllWithPagination(Pageable page) { + return Repository.findAll(page, getUser().getUserId()); + } +public List getdetails() { + List realm = realmService.findByUserId(getUser().getUserId()); +List all = Repository.findAll(getUser().getUserId()); + + return all ; } + + +public Test33 getdetailsbyId(Integer id) { + return Repository.findById(id).get(); + } + + + public void delete_by_id(Integer id) { + Repository.deleteById(id); +} + + +public Test33 update(Test33 data,Integer id) { + Test33 old = Repository.findById(id).get(); +old.setName(data.getName()); + +old.setDescription(data.getDescription()); + +old.setActive (data.isActive()); + +final Test33 test = Repository.save(old); + data.setUpdatedBy(getUser().getUserId()); + return test;} + + + + + + + public AppUser getUser() { + AppUser user = userService.getLoggedInUser(); + return user; + + }} diff --git a/testflutter3-db-d/authsec_mysql/mysql/wf_table/wf_table.sql b/testflutter3-db-d/authsec_mysql/mysql/wf_table/wf_table.sql new file mode 100755 index 0000000..464115f --- /dev/null +++ b/testflutter3-db-d/authsec_mysql/mysql/wf_table/wf_table.sql @@ -0,0 +1,12 @@ +CREATE TABLE db.Tesrt(id BIGINT NOT NULL AUTO_INCREMENT, active VARCHAR(400), description VARCHAR(400), name VARCHAR(400), PRIMARY KEY (id)); + +CREATE TABLE db.Test22(id BIGINT NOT NULL AUTO_INCREMENT, active VARCHAR(400), description VARCHAR(400), name VARCHAR(400), PRIMARY KEY (id)); + +CREATE TABLE db.Test1234(id BIGINT NOT NULL AUTO_INCREMENT, active VARCHAR(400), description VARCHAR(400), name VARCHAR(400), PRIMARY KEY (id)); + +CREATE TABLE db.Test33(id BIGINT NOT NULL AUTO_INCREMENT, active VARCHAR(400), description VARCHAR(400), name VARCHAR(400), PRIMARY KEY (id)); + +CREATE TABLE db.Test44(id BIGINT NOT NULL AUTO_INCREMENT, active VARCHAR(400), description VARCHAR(400), name VARCHAR(400), PRIMARY KEY (id)); + +CREATE TABLE db.T55(id BIGINT NOT NULL AUTO_INCREMENT, active VARCHAR(400), description VARCHAR(400), name VARCHAR(400), PRIMARY KEY (id)); +