mybatis查询时区分大小写

在查询条件中加入 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>

  

猜你喜欢

转载自www.cnblogs.com/guilf/p/9284041.html