List<Integer> ids = new ArrayList<Integer>(); ids.add(1); ids.add(2); Map<String, Object> params = new HashMap<String, Object>(); params.put("ids", ids); String jpql = "select o from oa_usersroles o where o.role.id in(:ids)"; List<Module> modules = em.createQuery(jpql).setParameter("ids", ids).getResultList();
posted on 2016-12-07 23:13  三人之行,必有我师  阅读(6342)  评论(0编辑  收藏  举报