• 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>
  • 相关阅读:
    Linux tmux 工具
    HTML 注释
    HTML 引用
    HTML 格式化
    /etc/services
    Linux ss 命令
    Python cookielib 模块
    爬取需要登录的页面
    hasattr() 、getattr() 、setattr()
    爬取文本
  • 原文地址:https://www.cnblogs.com/yangjinwang/p/6046761.html
Copyright © 2020-2023  润新知