1. 程式人生 > >java批量刪除操作

java批量刪除操作

<delete id="del">
DELETE FROM tb_test WHERE id IN
   <foreach collection="array" item="item" index="index" open="(" separator="," close=")">
#{item}
   </foreach>
</delete>
@RequestMapping("/del")
@ResponseBody
@ApiOperation(value = "批量刪除錯題", httpMethod = "POST")
public Dto<Test> del
(@ApiParam("錯題id") @RequestParam String[] ids) { return customService.del(ids); }