mybatis——xmlSql

mybatisXMLsql:

查询:

<select id="selectQiMoInfo" resultMap="BaseResultMap">
    select * from qimow;
</select>

批量插入:

<insert id ="insertBatch" parameterType="java.util.List" >
    insert into qimow(q_wname, q_wtype,q_wsize, q_wterm,q_wunit,q_wnum,q_wsprice,q_wtotalprice,
    q_wbankunit,q_wbailee,q_wissue)
    values
    <foreach collection ="list" item="item" index="index" separator =",">
        (#{item.qwName}, #{item.qwType},#{item.qwSize},#{item.qwTerm},#{item.qwUnit},#{item.qwNum},#{item.qwsPrice},
        #{item.qwTotalPrice},#{item.qwBankUnit},#{item.qwBailee},#{item.qwIssue})
    </foreach >
</insert >
posted @ 2020-09-12 15:03  渝思  阅读(193)  评论(0编辑  收藏  举报