mybatis xml parameterType="java.lang.String" if判断报错

问题:<select id="" resultMap="resultMapPlate" parameterType="java.lang.String"> 
               <if test="com != null"> 
                 and com = #{com,jdbcType=VARCHAR}
              </if>
                and open='chat'
         </select>

解决:将<if test="com != null"> 换为<if test="_parameter != null">


版权声明:本文为wang_ouyangsima原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。