i directly have to check ENUM in where condition ,
<if test="params.fileTypes != null and !params.fileTypes.isEmpty()">
AND
RTRIM(INTH.IF_FILETYPE) IN
<foreach item="item" index="index"
collection="params.fileTypes" open="(" separator="," close=")">
#{item}
</foreach>
</if>
<if test="params.fileTypes.isEmpty()">
AND
RTRIM(IF_FILETYPE) IN (#{@com.xyz.wealth.appconfiguration.domain.FileType})
</if>
Assuming that
com.xyz.wealth.appconfiguration.domain.FileTypeis the enum you are referring to and it has two values. e.g.The following MyBatis statement ...
... is translated into the SQL below and the enum values
DOCUMENTandIMAGEare bound to the placeholders as string respectively.