#通过PrepareStatument预编译为in的条件
public void updateAgainZf(String sqCode, String[] flIds) throws Exception {
StringBuffer sb = new StringBuffer("UPDATE FSS_BBXS_ZFXX SET AGAIN_ZF_FLAG='1' WHERE SQ_CODE=? AND FL_ID IN (?");
for (int i = 1; i < flIds.length; i++) {
sb.append(",?");
}
sb.append(" )");
Connection conn = null;
PreparedStatement ps = null;
try {
conn = ESPHolder.getESPUtils().getConn();
ps = conn.prepareStatement(sb.toString());
ps.setString(1, sqCode);
for (int i = 2; i < flIds.length + 2; i++) {
ps.setString(i, flIds[i - 2]);
}
ps.executeUpdate();
} catch (Exception e) {
e.printStackTrace();
throw e;
} finally {
DBConfigUtil.Close(null, ps, null);
}
}