@Transactional public String addOrder(final JSONObject order) throws ServiceException {
  try {
    order.put(Order.ORDER_CONFIRM_TIME,0);
    order.put(Order.ORDER_CREATE_TIME,System.currentTimeMillis());
    order.put(Order.ORDER_HANDLER_ID,"");
    order.put(Order.ORDER_STATUS,Order.ORDER_STATUS_C_INIT);
    return orderRepository.add(order);
  }
 catch (  final RepositoryException e) {
    LOGGER.log(Level.ERROR,"Adds order failed",e);
    throw new ServiceException(e);
  }
}

@ Transactional public String addOrder ( final JSONObject order ) throws ServiceException { try { order . put ( Order . ORDER_CONFIRM_TIME , 0 ) ; order . put ( Order . ORDER_CREATE_TIME , System . currentTimeMillis ( ) ) ; order . put ( Order . ORDER_HANDLER_ID , "" ) ; order . put ( Order . ORDER_STATUS , Order . ORDER_STATUS_C_INIT ) ; return orderRepository . add ( order ) ; } catch ( final RepositoryException e ) { LOGGER . log ( Level . ERROR , "Adds order failed" , e ) ; throw new ServiceException ( e ) ; } }
adds the specified order .
