mybatis支持拼音、汉字模糊查询
<if test="Name != null and Name != '' and Name.matches('[\u4e00-\u9fa5]+')">
and NAME like concat('%',#{Name},'%')
</if>
<if test="Name != null and Name != '' and Name .matches('[a-zA-Z]+')">
and (PINYIN like concat('%',#{Name},'%')
or WUBI like concat('%',#{Name},'%'))
</if>
版权声明:本文为tc_notebook原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。