SELECT * fromblog_article a where a.article_id in "item" collection="list"index="index"open="(" separator=","close=")"> #{item.article_id} and isdel = 0 orderby a.create_time desc,a.update_time desc select>
UPDATEtable SETcontent="#{content}" WHERE idin "ids"index="index" item="item"open="(" separator=","close=")"> #{item} update>
还有一种
UPDATE usr_relation_umbrella SET child_number = CASE user_id "list" item="item"> WHEN#{item.userId} THEN #{item.childNumber} END WHERE user_id IN "item" collection="list"index="index"open="(" separator=","close=")"> #{item.userId} update>
多个
UPDATE categories SET display_order = CASEid WHEN1THEN3 WHEN2THEN4 WHEN3THEN5 END, title = CASEid WHEN1THEN'New Title 1' WHEN2THEN'New Title 2' WHEN3THEN'New Title 3' END WHEREidIN (1,2,3)