zoukankan      html  css  js  c++  java
  • Mybatis用法

    <!-- include 引用字段 -->

    <sql id="Base_Column_List">
    D_RECID, D_USER_NAME, D_NAME, D_TYPE, ...
    </sql>

    <select id="select" resultMap="BaseResultMap" parameterType="java.util.Map">
    select
    <include refid="Base_Column_List"/>
    from T_PRINT_LAYOUT

    </select>

    <!-- where标签相当 于where关键字,可以自动去除第一个and -->
    <where>
    <include refid="get_where"></include>
    </where>

    <!-- include 引用其他sql段 -->
    <sql id="get_where">
    </sql>

    <!-- CONCAT函数添加前缀后缀,substring_index函数截取'.'前面的内容 -->

    select CONCAT(CONCAT('/files',floderpath,'app/'),substring_index(dosname,'.',1),'.jpg') filePath from t

     <!-- foreach用法 需要注意Controller里面的参数2必须为String[] param2 也可以采用arg1 -->

    <if test="param2 != null and param2 != ''">
    <foreach collection="param2" open=" AND catname IN ( " close=")" item="param2" separator=",">
    #{param2}
    </foreach>
    </if>

  • 相关阅读:
    poj2975(nim游戏取法)
    hdu5785(极角排序求所有锐角钝角个数)
    hdu5787(数位dp)
    划分树模板
    Struts配置文件
    Struts2 调用非execute方法
    Struts简单的实例
    Struts简介
    linux yum 命令
    Linux vi/vim
  • 原文地址:https://www.cnblogs.com/liw66/p/10413788.html
Copyright © 2011-2022 走看看