hql中的in查詢


public List<ShopDianpu> findbymiaosha(long id, List<Object> list)
            throws Exception {
        String hql="from ShopDianpu where dianput.id="+id+" and shop.zhuangtai='1' and LENGTH(huodong)>5 and shop.id not in (:list) order by shop.rexiaoshezhi desc,shop.dianleipaixu asc";
        Query createQuery = getSession().createQuery(hql);
        createQuery.setParameterList("list", list);
        return createQuery.list();
    }

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。