src/main/java/com/kshrd/derphsar_api/rest/restcontroller/OrderDetailRestController.java
/**
     * Delete an order detail
     *
     * @param orderDetailId - Id of order detail
     * @return - Return response message
     */
Delete an order detail
@param orderDetailId - Id of order detail
@return - Return response message
Delete an order detail @param orderDetailId - Id of order detail @return - Return response message
@DeleteMapping("/orderdetails/{orderDetailId}")
    @ApiOperation("Delete OrderDetail by OrderDetailId")
    public ResponseEntity<BaseApiNoPaginationResponse<String>> delete(@PathVariable String orderDetailId)
    {
        BaseApiNoPaginationResponse<String> response = new BaseApiNoPaginationResponse<>();
        try{
            Boolean isDeleted = orderDetailServiceImp.deleteOrderdetail(orderDetailId);
            if(isDeleted)
            {
                response.setMessage(message.deleted("OrderDetail"));
                response.setStatus(HttpStatus.OK);
            }
            else
            {
                response.setMessage(message.deleteError("OrderDetail"));
                response.setStatus(HttpStatus.BAD_REQUEST);
            }
        }catch (Exception e)
        {
            response.setMessage(message.deleteError("OrderDetails"));
            response.setStatus(HttpStatus.BAD_REQUEST);
        }
        response.setTime(new Timestamp(System.currentTimeMillis()));
        return ResponseEntity.ok(response);
    }
@ DeleteMapping ( "/orderdetails/{orderDetailId}" ) @ ApiOperation ( "Delete OrderDetail by OrderDetailId" ) public ResponseEntity < BaseApiNoPaginationResponse < String > > delete ( @ PathVariable String orderDetailId ) { BaseApiNoPaginationResponse < String > response = new BaseApiNoPaginationResponse < > ( ) ; try { Boolean isDeleted = orderDetailServiceImp . deleteOrderdetail ( orderDetailId ) ; if ( isDeleted ) { response . setMessage ( message . deleted ( "OrderDetail" ) ) ; response . setStatus ( HttpStatus . OK ) ; } else { response . setMessage ( message . deleteError ( "OrderDetail" ) ) ; response . setStatus ( HttpStatus . BAD_REQUEST ) ; } } catch ( Exception e ) { response . setMessage ( message . deleteError ( "OrderDetails" ) ) ; response . setStatus ( HttpStatus . BAD_REQUEST ) ; } response . setTime ( new Timestamp ( System . currentTimeMillis ( ) ) ) ; return ResponseEntity . ok ( response ) ; }
Delete an order detail
 @param orderDetailId - Id of order detail
 @return - Return response message
Delete an order detail @param orderDetailId - Id of order detail @return - Return response message