public ResultBean update(T po) { Logger.SERVICE.ldebug( "更新[" + po.getClass().getAnnotation(Table.class).name() + "]数据", po.toString()); try { getDao().update(po); return ResultBean.RESULT_SUCCESS(po); } catch (Exception e) { exceptionHandler.onDatabaseException("更新记录错误", e); return ResultBean.RESULT_ERR(e.getMessage(), po); } }
public ResultBean update2(T obj) { Logger.SERVICE.ldebug( "更新[" + obj.getClass().getAnnotation(Table.class).name() + "]数据", obj.toString()); try { UpdateEntity entity = new UpdateEntity(); entity.init(obj, false); getDao().update2(entity); return ResultBean.RESULT_SUCCESS(obj); } catch (Exception e) { exceptionHandler.onDatabaseException("更新记录错误", e); return ResultBean.RESULT_ERR(e.getMessage(), obj); } }