zoukankan      html  css  js  c++  java
  • java mybatis 中sql 模糊查询

    示例:
    
    like  concat('%',#{groupName},'%')
    
    //--------------
    
    <select id="findList" resultType="com.thinkgem.jeesite.modules.rule.entity.RuleCombinationModel">
    SELECT 
    <include refid="cmsGuestbookColumns"/>
    FROM t_zg_rule_group a
    <where>
    a.DELETE_STATUS = 0
    <if test="groupNumber!='' and groupNumber!=null ">
    and a.GROUP_NUMBER=#{groupNumber}
    </if>
    <if test="groupName!='' and groupName!=null ">
    and a.GROUP_NAME like concat('%',#{groupName},'%')
    <!-- concat('%',#{productName},'%') -->
    </if>
    <if test="groupStatus!='' and groupStatus!=null ">
    and a.GROUP_STATUS=#{groupStatus}
    </if>
    </where>
    <choose>
    <when test="page !=null and page.orderBy != null and page.orderBy != ''">
    ORDER BY ${page.orderBy}
    </when>
    <otherwise>
    ORDER BY a.CREATEDON DESC
    </otherwise>
    </choose>
    </select>
  • 相关阅读:
    python常用库
    python多线程
    python内存泄漏
    用python实现js语言里的特性
    nginx + uwsgi
    mysql语句
    urllib模块
    提取数据xpath,re,css
    selenium模块
    脱壳
  • 原文地址:https://www.cnblogs.com/yangjinwang/p/6046761.html
Copyright © 2011-2022 走看看