NutzCN Logo
问答 通过sqls获取的sql语句怎么分页
发布于 2225天前 作者 wx_91t0i8kp1n5lcv4nqstq 1805 次浏览 复制 上一个帖子 下一个帖子
标签:

Sql sql = Sqls.queryEntity(dao.sqls().get("Client.card"));
SimpleCriteria cir = Cnd.cri();
cir.where().and("spt.goods_type","=","会员卡");

    cir.where().and("spt.corp_id","=", orgId);
    cir.desc("id");

    if(seacherKey!=null && !seacherKey.equals("")){
       cir.where().and(new Static(" name like '%"+seacherKey+"%' "));
    }
    sql.setCondition(cir);
    sql.setCallback(Sqls.callback.entities());
    sql.setEntity(dao.getEntity(ShopMemberShipCard.class));
    dao.execute(sql);

    List<ShopMemberShipCard> shipCard = sql.getList(ShopMemberShipCard.class);
1 回复
添加回复
请先登陆
回到顶部