@Override public boolean addTransFare(TransFarePO po) throws RemoteException { // TODO Auto-generated method stub String driverID = po.getDriverID(); String orderID = po.getOrderID(); double money = po.getFare(); builder = new SQLBuilder(); builder.InsertInto(tableName, money_col, orderID_col, driverID_col) .Values(money, orderID, driverID); try { builder.excute(); return true; } catch (Exception e) { e.printStackTrace(); return false; } }
@Override public boolean deleteTransFare(List<TransFarePO> transFareList) throws RemoteException { // TODO Auto-generated method stub builder = new SQLBuilder(); for (TransFarePO po : transFareList) { String driverID = po.getDriverID(); String orderID = po.getOrderID(); builder.DeleteFrom(tableName).Where(orderID_col).EQUALS(orderID); System.out.println(builder); try { builder.excute(); } catch (Exception e) { e.printStackTrace(); return false; } } return true; }