@Override public boolean updateReference(String billNo, boolean mode) throws UpdateReferenceException { if (null == billNo || "".equals(billNo)) { return false; } String hql = "update SalesContract t set t.children = t.children + " + (mode ? 1 : -1) + " where t.billNo='" + billNo + "'"; if (baseDao.executeUpdate(hql) > 0) { return true; } else { throw new UpdateReferenceException("更新引用异常"); } }