在查询条件中加入 BINARY
<sql id="condition_sql" >
<if test="name != null" >
and BINARY name = #{name}
</if>
<if test="passwd != null" >
and BINARY passwd = #{passwd}
</if>
<if test="addTime != null" >
and add_time = #{addTime}
</if>
<if test="status != null" >
and status = #{status}
</if>
</sql>