码家

Web Platform, Cloud and Mobile Application Development

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::

<delete id="deleteCTQ" parameterType="java.lang.String">

DELETE FROM sqm_product_ctq_current where guid in

<foreach item="idItem" collection="array" open="(" separator="," close=")">

#{idItem}

</foreach>

</delete>

 

sqm_product_ctq_current 表名

guid  字段名

collection里表示类型,这里是array,还可以是list

idItem不用管,相当于一个变量

 

这个是写在xxxMapper.xml里的

id="deleteCTQ"在xxxMapper.java里需要有对应的方法

 

public

void deleteCTQ(String[] ctqGuids);

这里传进来的参数就是一个字符串型的数据

posted on 2011-10-09 09:55  海山  阅读(36497)  评论(1)    收藏  举报