public AutoDto queryOrderDetail(Long crmInfId) throws Exception {
AutoDto dto = new AutoDto();
Connection conn = null;
PreparedStatement ps = null;
ResultSet rs = null;
try {
conn = getConnection();
ps = conn.prepareStatement("select a.CONTENT from inf_crm_mission a where a.id = "
+ crmInfId + " for update ");
rs = ps.executeQuery();
if (rs.next()) {
java.sql.Blob blob = rs.getBlob(1);
InputStream ins = blob.getBinaryStream();
byte[] c = new byte[(int) blob.length()];
ins.read(c);
String data = new String(c);
dto.setReturnContent(data);
// 依次关闭
ins.close();
rs.close();
}
return dto;
} finally {
cleanUp(conn, null, ps, rs);
}
}