NutzCN Logo
问答 dao的func方法怎么实现两个一对一的表关联查询 sum副表的字段啊
发布于 2285天前 作者 lalala 1701 次浏览 复制 上一个帖子 下一个帖子
标签:
dao.func2(OutStock.class,"sum","cktaxe", Cnd.where("yxbz","=","1").and("status","=","0")
        .and("shrq",">=", DateUtil.getQueryTimeByStart(startTime)).and("shrq","<=",DateUtil.getQueryTimeByEnd(endTime)));

cktaxe这个字段是在另外一个表上面,查询条件都是在主表上,就是outstock对应的表

1 回复

有 new Static这种大招

cnd.where(...).and(...).and(new Static("xxx in (select xxx from yyy where xxx ... xxx)"));

添加回复
请先登陆
回到顶部