欧美一级特黄大片做受成人-亚洲成人一区二区电影-激情熟女一区二区三区-日韩专区欧美专区国产专区

mybatis動(dòng)態(tài)插入list傳入List參數(shù)的示例分析-創(chuàng)新互聯(lián)

小編給大家分享一下mybatis動(dòng)態(tài)插入list傳入List參數(shù)的示例分析,相信大部分人都還不怎么了解,因此分享這篇文章給大家參考一下,希望大家閱讀完這篇文章后大有收獲,下面讓我們一起去了解一下吧!

成都網(wǎng)站建設(shè)、成都網(wǎng)站設(shè)計(jì),成都做網(wǎng)站公司-創(chuàng)新互聯(lián)已向數(shù)千家企業(yè)提供了,網(wǎng)站設(shè)計(jì),網(wǎng)站制作,網(wǎng)絡(luò)營(yíng)銷等服務(wù)!設(shè)計(jì)與技術(shù)結(jié)合,多年網(wǎng)站推廣經(jīng)驗(yàn),合理的價(jià)格為您打造企業(yè)品質(zhì)網(wǎng)站。

mybatis動(dòng)態(tài)插入list的實(shí)例代碼如下所述:

<insert id="savePrpcitemkindList" parameterType="java.util.List">
insert into prpcitemkind
(RISKCODE, ITEMKINDNO, FAMILYNO, FAMILYNAME, PROJECTCODE, CLAUSECODE,
CLAUSENAME,
KINDCODE, KINDNAME, ITEMNO, ITEMCODE, ITEMDETAILNAME, GROUPNO, MODECODE,
MODENAME, STARTDATE,
STARTHOUR, ENDDATE, ENDHOUR, MODEL, BUYDATE, ADDRESSNO, CALCULATEFLAG, CURRENCY,
UNITAMOUNT,
QUANTITY, UNIT, VALUE, AMOUNT, RATEPERIOD, RATE, SHORTRATEFLAG, SHORTRATE,
PREPREMIUM, CALPREMIUM,
BASEPREMIUM, BENCHMARKPREMIUM, DISCOUNT, ADJUSTRATE, UNITPREMIUM, PREMIUM,
DEDUCTIBLERATE, DEDUCTIBLE,
FLAG, INSERTTIMEFORHIS, OPERATETIMEFORHIS, TAXRATE, TAXFLAG, TAXFEE,
NETPREMIUM, TAXFEE_GB, TAXFEE_LB, ALLTAXFEE, ALLNETPREMIUM,PROPOSALNO)
<foreach collection="list" item="item" index="index" separator="union all">
<trim prefix="select" suffix="from dual">
<choose>
<when test="item.riskcode != null">#{item.riskcode},</when>
<otherwise>null,</otherwise>
</choose>
<choose>
<when test="item.itemkindno != null">#{item.itemkindno},</when>
<otherwise>null,</otherwise>
</choose>
<choose>
<when test="item.familyno != null">#{item.familyno},</when>
<otherwise>null,</otherwise>
</choose>
<choose>
<when test="item.familyname != null">#{item.familyname},</when>
<otherwise>null,</otherwise>
</choose>
<choose>
<when test="item.projectcode != null">#{item.projectcode},</when>
<otherwise>null,</otherwise>
</choose>
<choose>
<when test="item.clausecode != null">#{item.clausecode},</when>
<otherwise>null,</otherwise>
</choose>
<choose>
<when test="item.clausename != null">#{item.clausename},</when>
<otherwise>null,</otherwise>
</choose>
<choose>
<when test="item.kindcode != null">#{item.kindcode},</when>
<otherwise>null,</otherwise>
</choose>
<choose>
<when test="item.kindname != null">#{item.kindname},</when>
<otherwise>null,</otherwise>
</choose>
<choose>
<when test="item.itemno != null">#{item.itemno},</when>
<otherwise>null,</otherwise>
</choose>
<choose>
<when test="item.itemcode != null">#{item.itemcode},</when>
<otherwise>null,</otherwise>
</choose>
<choose>
<when test="item.itemdetailname != null">#{item.itemdetailname},</when>
<otherwise>null,</otherwise>
</choose>
<choose>
<when test="item.groupno != null">#{item.groupno},</when>
<otherwise>null,</otherwise>
</choose>
<choose>
<when test="item.modecode != null">#{item.modecode},</when>
<otherwise>null,</otherwise>
</choose>
<choose>
<when test="item.modename != null">#{item.modename},</when>
<otherwise>null,</otherwise>
</choose>
<choose>
<when test="item.startdate != null">#{item.startdate},</when>
<otherwise>null,</otherwise>
</choose>
<choose>
<when test="item.starthour != null">#{item.starthour},</when>
<otherwise>null,</otherwise>
</choose>
<choose>
<when test="item.enddate != null">#{item.enddate},</when>
<otherwise>null,</otherwise>
</choose>
<choose>
<when test="item.endhour != null">#{item.endhour},</when>
<otherwise>null,</otherwise>
</choose>
<choose>
<when test="item.model != null">#{item.model},</when>
<otherwise>null,</otherwise>
</choose>
<choose>
<when test="item.buydate != null">#{item.buydate},</when>
<otherwise>null,</otherwise>
</choose>
<choose>
<when test="item.addressno != null">#{item.addressno},</when>
<otherwise>null,</otherwise>
</choose>
<choose>
<when test="item.calculateflag != null">#{item.calculateflag},</when>
<otherwise>null,</otherwise>
</choose>
<choose>
<when test="item.currency != null">#{item.currency},</when>
<otherwise>null,</otherwise>
</choose>
<choose>
<when test="item.unitamount != null">#{item.unitamount},</when>
<otherwise>null,</otherwise>
</choose>
<choose>
<when test="item.quantity != null">#{item.quantity},</when>
<otherwise>null,</otherwise>
</choose>
<choose>
<when test="item.unit != null">#{item.unit},</when>
<otherwise>null,</otherwise>
</choose>
<choose>
<when test="item.value != null">#{item.value},</when>
<otherwise>null,</otherwise>
</choose>
<choose>
<when test="item.amount != null">#{item.amount},</when>
<otherwise>null,</otherwise>
</choose>
<choose>
<when test="item.rateperiod != null">#{item.rateperiod},</when>
<otherwise>null,</otherwise>
</choose>
<choose>
<when test="item.rate != null">#{item.rate},</when>
<otherwise>null,</otherwise>
</choose>
<choose>
<when test="item.shortrateflag != null">#{item.shortrateflag},</when>
<otherwise>null,</otherwise>
</choose>
<choose>
<when test="item.shortrate != null">#{item.shortrate},</when>
<otherwise>null,</otherwise>
</choose>
<choose>
<when test="item.prepremium != null">#{item.prepremium},</when>
<otherwise>null,</otherwise>
</choose>
<choose>
<when test="item.calpremium != null">#{item.calpremium},</when>
<otherwise>null,</otherwise>
</choose>
<choose>
<when test="item.basepremium != null">#{item.basepremium},</when>
<otherwise>null,</otherwise>
</choose>
<choose>
<when test="item.benchmarkpremium != null">#{item.benchmarkpremium},</when>
<otherwise>null,</otherwise>
</choose>
<choose>
<when test="item.discount != null">#{item.discount},</when>
<otherwise>null,</otherwise>
</choose>
<choose>
<when test="item.adjustrate != null">#{item.adjustrate},</when>
<otherwise>null,</otherwise>
</choose>
<choose>
<when test="item.unitpremium != null">#{item.unitpremium},</when>
<otherwise>null,</otherwise>
</choose>
<choose>
<when test="item.premium != null">#{item.premium},</when>
<otherwise>null,</otherwise>
</choose>
<choose>
<when test="item.deductiblerate != null">#{item.deductiblerate},</when>
<otherwise>null,</otherwise>
</choose>
<choose>
<when test="item.deductible != null">#{item.deductible},</when>
<otherwise>null,</otherwise>
</choose>
<choose>
<when test="item.flag != null">#{item.flag},</when>
<otherwise>null,</otherwise>
</choose>
<choose>
<when test="item.inserttimeforhis != null">#{item.inserttimeforhis},</when>
<otherwise>null,</otherwise>
</choose>
<choose>
<when test="item.operatetimeforhis != null">#{item.operatetimeforhis},</when>
<otherwise>null,</otherwise>
</choose>
<choose>
<when test="item.taxrate != null">#{item.taxrate},</when>
<otherwise>null,</otherwise>
</choose>
<choose>
<when test="item.taxflag != null">#{item.taxflag},</when>
<otherwise>null,</otherwise>
</choose>
<choose>
<when test="item.taxfee != null">#{item.taxfee},</when>
<otherwise>null,</otherwise>
</choose>
<choose>
<when test="item.netpremium != null">#{item.netpremium},</when>
<otherwise>null,</otherwise>
</choose>
<choose>
<when test="item.taxfee_gb != null">#{item.taxfee_gb},</when>
<otherwise>null,</otherwise>
</choose>
<choose>
<when test="item.taxfee_lb != null">#{item.taxfee_lb},</when>
<otherwise>null,</otherwise>
</choose>
<choose>
<when test="item.alltaxfee != null">#{item.alltaxfee},</when>
<otherwise>null,</otherwise>
</choose>
<choose>
<when test="item.allnetpremium != null">#{item.allnetpremium},</when>
<otherwise>null,</otherwise>
</choose>
#{item.proposalno}
</trim>
</foreach> 
 </insert>

Mybatis 傳入List參數(shù)的實(shí)例代碼如下所述:

Java代碼

//dao 代碼 如果傳入的參數(shù)是數(shù)組,也一樣 
void insertDefaultMsg(@Param("idsList") ArrayList<String> idsList); 
//xml文件 
<update id="insertDefaultMsg" parameterType="java.util.List"> 
    UPDATE  
     plf_pur_delivery_plan p  
    SET 
     p.promise_delivery_amount = p.quantity_req, 
     p.promise_delivery_time = p.quantity_time  
    WHERE p.id IN 
    <foreach item="item" collection="idsList" separator="," open="(" close=")" index="">  
     #{item, jdbcType=VARCHAR}  
    </foreach>  
  </update> 
//如果傳入字符串 
//service 代碼 
Map<String, String> map = bean.getDatas().get(0); 
    String ids = map.get("ids"); 
    String[] idsArr = ids.split(","); 
    String inId = ""; 
    for (int i = 0; i < idsArr.length; i++) { 
      if (i != idsArr.length - 1) { 
        inId += "'" + idsArr[i] + "',"; 
      } else { 
        inId += "'" + idsArr[i] + "'"; 
      } 
    } 
    List<Map<String, String>> list = purDeliveryPlanDao 
        .getPlanListManual(inId); 
//dao層代碼 
List<Map<String, String>> getPlanListManual(@Param("inId") String inId); 
//xml 文件 
<select id="getPlanListManual" parameterType="java.lang.String" resultType="java.util.Map"> 
    SELECT  
     p.supplier_code, 
     p.pur_order_no, 
     IF( 
      p.update_times > 0, 
      '修改訂單', 
      '新訂單' 
     ) AS order_type  
    FROM 
     plf_pur_delivery_plan p  
    WHERE p.is_notice = '0'  
     AND p.is_delete = '1'  
     AND p.id in(<![CDATA[${inId}]]>) 
    GROUP BY p.supplier_code, 
     p.pur_order_no  
    ORDER BY p.supplier_code  
  </select>

以上是“mybatis動(dòng)態(tài)插入list傳入List參數(shù)的示例分析”這篇文章的所有內(nèi)容,感謝各位的閱讀!相信大家都有了一定的了解,希望分享的內(nèi)容對(duì)大家有所幫助,如果還想學(xué)習(xí)更多知識(shí),歡迎關(guān)注創(chuàng)新互聯(lián)行業(yè)資訊頻道!

當(dāng)前文章:mybatis動(dòng)態(tài)插入list傳入List參數(shù)的示例分析-創(chuàng)新互聯(lián)
網(wǎng)站URL:http://aaarwkj.com/article6/iseog.html

成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供移動(dòng)網(wǎng)站建設(shè)品牌網(wǎng)站制作、企業(yè)網(wǎng)站制作、定制開發(fā)、做網(wǎng)站手機(jī)網(wǎng)站建設(shè)

廣告

聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請(qǐng)盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如需處理請(qǐng)聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來源: 創(chuàng)新互聯(lián)

成都seo排名網(wǎng)站優(yōu)化
久久蜜臀av一区三区| 线上免费看黄色亚洲片| 在线观看中文字幕一区| 日本加勒比中文在线观看| 三级国产大片在线观看| 国产日韩欧美另类专区| 91手机国产三级在线| 日韩电影在线播放中文字幕| 欧美黄片网站在线观看| 国产在线麻豆在拍91精品| 极品美女被插到高潮喷水| 91麻豆精品国产自产| 亚洲精品一区二区牛仔裤| 国产99久久精品免费看| 成人色视频免费在线观看| 欧美十日本亚洲激情视频| 亚洲国产中文一区二区久久| 色哟哟视频在线免费观看| 欧美精品在,欧美一区二区| 久久人妻蜜桃一区二区三区| 日本韩国亚洲欧美一区二区| 久久精品国产亚洲七七| 亚洲天堂福利视频网站| 亚州欧美制服另类国产| 国产免费成人在线视频| 日韩欧美国产亚洲在线| 夫妻性生活黄色录像视频| 蜜桃精品视频在线播放| 色中文字幕人妻诱惑制服| 国产高清av免费在线观看| 国产av剧情精品亚洲| 99久久婷婷免费国产综合精品| av午夜精品一区二区| 亚洲福利一区二区三区| avav男人天堂亚洲天堂| 9热在线视频精品这里只有| 日韩欧美一区二区不卡在线| 欧美黄片视频在线免费看| av午夜精品一区二区| 在线观看高清国产黄色片| 成年人午夜在线观看网址|