Пример #1
0
 /** PUT /status_bill_services -> Updates an existing status_bill_service. */
 @RequestMapping(
     value = "/status_bill_services",
     method = RequestMethod.PUT,
     produces = MediaType.APPLICATION_JSON_VALUE)
 @Timed
 public ResponseEntity<Status_bill_service> updateStatus_bill_service(
     @Valid @RequestBody Status_bill_service status_bill_service) throws URISyntaxException {
   log.debug("REST request to update Status_bill_service : {}", status_bill_service);
   if (status_bill_service.getId() == null) {
     return createStatus_bill_service(status_bill_service);
   }
   Status_bill_service result = status_bill_serviceService.save(status_bill_service);
   return ResponseEntity.ok()
       .headers(
           HeaderUtil.createEntityUpdateAlert(
               "status_bill_service", status_bill_service.getId().toString()))
       .body(result);
 }
Пример #2
0
 /** POST /status_bill_services -> Create a new status_bill_service. */
 @RequestMapping(
     value = "/status_bill_services",
     method = RequestMethod.POST,
     produces = MediaType.APPLICATION_JSON_VALUE)
 @Timed
 public ResponseEntity<Status_bill_service> createStatus_bill_service(
     @Valid @RequestBody Status_bill_service status_bill_service) throws URISyntaxException {
   log.debug("REST request to save Status_bill_service : {}", status_bill_service);
   if (status_bill_service.getId() != null) {
     return ResponseEntity.badRequest()
         .headers(
             HeaderUtil.createFailureAlert(
                 "status_bill_service",
                 "idexists",
                 "A new status_bill_service cannot already have an ID"))
         .body(null);
   }
   Status_bill_service result = status_bill_serviceService.save(status_bill_service);
   return ResponseEntity.created(new URI("/api/status_bill_services/" + result.getId()))
       .headers(
           HeaderUtil.createEntityCreationAlert("status_bill_service", result.getId().toString()))
       .body(result);
 }