/** * 删除多条记录 * * @param id 用于删除的记录的id * @return 成功删除的记录数 */ public int delete(String id[]) { String strsql = " WHERE ID IN ("; if (id == null || id.length == 0) return 0; strsql += RmStringHelper.parseToSQLStringApos(id) + ")"; // 把id数组转换为id1,id2,id3 strsql = SQL_DELETE_MULTI_BY_IDS + strsql; return update(strsql); }
static String rebuildUri(HttpServletRequest request, String redirectUrlPrefix) { HttpSession session = ((HttpServletRequest) request).getSession(true); StringBuilder url = new StringBuilder(); if (redirectUrlPrefix.endsWith("/")) { redirectUrlPrefix = redirectUrlPrefix.substring(0, redirectUrlPrefix.length() - 1); } url.append(redirectUrlPrefix); String uri = request.getRequestURI().substring(request.getContextPath().length()); url.append(uri); url.append("?"); if (request.getQueryString() != null) { url.append(request.getQueryString()); url.append("&"); } url.append(ssoKey); url.append("="); try { url.append( RmStringHelper.encodeUrl( RmCryptoHelper.encryptDesBase64( RmSsoLogin.createInstance(session.getId()).toString()))); } catch (Exception e) { e.printStackTrace(); } return url.toString(); }