Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private String vendorCode;
- private VendorType sth;
- private String sth;
- private String sth;
- private String sth;
- private String sth;
- private String sth;
- private String sth;
- public ResponseEntity<?> restSaveVendors(@RequestBody sth sthConfiguration)
- {
- Optional<sthEntity> sthEntity = sthRepository.findBysthCode(sthConfiguration.getsth().getsthCode());
- if(sthEntity.isPresent())
- {
- return new ResponseEntity<>(HttpStatus.BAD_REQUEST);
- }
- so my code is below; I think is wrong
- if(sthEntity != null)
- {
- sthRepository.save(sthConfiguration.getsth());
- }
Add Comment
Please, Sign In to add comment