ibatis 模糊查询和多条件查询

来源:互联网 发布:招商银行网络银行 编辑:程序博客网 时间:2024/05/17 06:11
    <select        id="getList"        parameterType="remotecollaborationDO"        resultType="remotecollaborationDO" >        SELECT  t1.id,t1.send_user_id,t1.status,t1.content,t1.profile,        t1.contact_person,t1.contact_tel,t1.institute,t1.email,t1.comment,t2.real_name        FROM remote_collaboration t1        LEFT JOIN user_info t2         ON t1.send_user_id=t2.user_id        where 1=1        <if test="(status!=3 )" >        and status=#{status}        </if>        <if test="real_name!=null and real_name!=''  " >        and real_name  like CONCAT('%', trim(#{real_name}),'%')        </if>        <if test="(itemPerPage!=null and itemPerPage!=0 and startRow>=0)" >            limit #{startRow}, #{itemPerPage}         </if>    </select>


0 0
原创粉丝点击