def batchDelete(Class entityClass,ids){ entityClass.executeUpdate("delete ${entityClass.name} where id in(:ids)",[ids:ids*.toLong()]) //还需清除sessionFactory缓存中数据 entityClass.withSession{ session -> ids.each{ id -> session.sessionFactory.evict(entityClass,id) } } }
用户登录
还没有账号?立即注册
用户注册
投稿取消
文章分类: |
|
还能输入300字
上传中....