mybatis数据库模糊查询多字段语句问题

之前单表可以对表中数据进行连接字符串 现在连接多字段提示找不到o.delivery__name等字段 怎么办_

   <select id="showorder" resultMap="BaseResultMap"
        parameterType="java.util.Map">
        select o.*,g.goods_repertory,g.goods_code,g.goods_name,g.goods_standard,g.goods_master_name
        from qry_order as o
        left join cfg_goods as g on o.goods_coding=g.goods_coding
        <where>
            <if test="key != null and key != '' ">
             CONCAT(`o.delivery_name`,`o.order_lpn`,`o.order_remark`) LIKE CONCAT(CONCAT('%', #{key}),'%')
             </if>
             <if test="type == null or type == '' ">
             and o.order_type !=2
             </if>
             <if test="type !=null and type != ''">
             and o.order_type =#{type}
             </if>
             and order_create_time >adddate(now(), INTERVAL -6 HOUR)
        </where>
        <if test="sortName != null and sortName != '' ">
            order by o.${sortName} ${order}
        </if>
        limit #{offset},#{limit}
    </select>

like构成的条件中要用or或者and连接,你拼接不对