/** * 订单缴费 * * @param userId * @param orderId * @param paymentId * @return */ public String orderPay(String userId, String orderId, String paymentId) { Order order = new Order(orderId).load(); order.setPreStatus(order.getOrderStatus()); order.setOrderStatus(Order.STATUS_PAYED); order.setStatusDate(new java.sql.Timestamp(System.currentTimeMillis())); if (order.update()) { return order.getId(); } else { return ""; } }
/** * 保存订单 * * @param userId * @param orderId * @return */ public String orderSave(String userId, String orderId) { Order order = new Order(orderId).load(); order.setPreStatus(order.getOrderStatus()); order.setOrderStatus(Order.STATUS_SAVED); order.setStatusDate(new java.sql.Timestamp(System.currentTimeMillis())); { OrderDetail detail = order.loadDetail(); resourceLock(detail.getInstructionVehicleLock()); resourceLock(detail.getTrainingFieldLock()); resourceLock(detail.getCoachLock()); } if (order.update()) { return order.getId(); } else { return ""; } }