oracle字符转换函数
public Boolean JudgeIsQuality(Collection<String> tabIdLists){
Connection editConn = null;
try {
editConn = GlobalDBConnector.getInstance().getEditConnection();
String sql = "SELECT TAB_TYPE FROM ADAS_TAB_INFO WHERE 1=1 AND TAB_TYPE = 1";
if (CollectionUtils.isNotEmpty(tabIdLists)) {
sql += "AND TAB_ID IN (SELECT to_char(column_value) FROM TABLE(clob_to_table(?)))";
}
logger.info("==========sql:"+sql);
QueryRunner runner = new QueryRunner();
return runner.query(editConn, sql, new ResultSetHandler<Boolean>() {
@Override
public Boolean handle(ResultSet rs) throws SQLException {
if(rs.next())
return Boolean.TRUE;
return Boolean.FALSE;
}
}, StringUtils.join(tabIdLists,","));
}catch (Exception e){
logger.error("根据tabIds查询tabType发生error:" + e.getMessage());
DbUtils.rollbackAndCloseQuietly(editConn);
}finally {
DbUtils.commitAndCloseQuietly(editConn);
}
return Boolean.FALSE;
}
天行健,君子以自强不息。