我有一个如下查询,
<select id="getTableName" resultType="java.lang.String" parameterType="java.lang.String">
Select Distinct TableName From TABLE_COLUMN_MAPPING Where COLUMNNAME IN (#{columnNames})
</select>
我通过传递如下值来调用服务方法。
sampleService.getTableName("'BANKRM','APPLICANTID','APPLICANTTYPE','APPLICANTTYPE','TOTAL','SCQUES9'");
但它的回归...... []
帮助我为什么没有得到值而是得到空列表。
PS:我检查了日志,它的语句创建没有任何问题
2013-03-22 19:16:27,521 DEBUG [main] org.apache.ibatis.datasource.pooled.PooledDataSource (debug:27) - Created connection 23845098.
2013-03-22 19:16:27,590 DEBUG [main] java.sql.Connection (debug:27) - ooo Connection Opened
2013-03-22 19:16:27,670 DEBUG [main] java.sql.PreparedStatement (debug:27) - ==> Executing: Select Distinct TableName From Config_FieldDetails Where COLUMNNAME IN (?)
2013-03-22 19:16:27,670 DEBUG [main] java.sql.PreparedStatement (debug:27) - ==> Parameters: 'BANKRM','APPLICANTID','APPLICANTTYPE','APPLICANTTYPE','TOTAL','SCQUES9'(String)
2013-03-22 19:16:27,954 DEBUG [main] java.sql.Connection (debug:27) - xxx Connection Closed
2013-03-22 19:16:27,955 DEBUG [main] org.apache.ibatis.datasource.pooled.PooledDataSource (debug:27) - Returned connection 23845098 to pool.
2013-03-22 19:16:27,955 INFO [main] com.hcl.cob.mybatis.bpm.service.impl.COBBPMCommonServiceImpl (getTableNameFromConfigFieldDetails:41) - getTableNameFromConfigFieldDetails(String columnName) -- End