提交 df88a3fd 编写于 作者: ibizdev's avatar ibizdev

ibizdev提交

上级 84bdff1f
......@@ -28,6 +28,10 @@ import cn.ibizlab.util.helper.CachedBeanCopier;
import cn.ibizlab.core.dict.repository.IBZDictRepository;
import org.springframework.data.mongodb.core.MongoTemplate;
import org.springframework.data.mongodb.core.query.BasicQuery;
import org.springframework.data.mongodb.core.query.Query;
import javax.annotation.Resource;
/**
* 实体[数据字典] 服务对象接口实现
......@@ -111,12 +115,18 @@ public class IBZDictServiceImpl implements IIBZDictService {
}
@Resource
private MongoTemplate mongoTemplate;
/**
* 查询集合 DEFAULT
*/
@Override
public Page<IBZDict> searchDefault(IBZDictSearchContext context) {
return repository.findAll(context.getPageable());
Query query = new BasicQuery(context.getSelectCond().get().toString());
long total = mongoTemplate.count(query, IBZDict.class);
List<IBZDict> list=mongoTemplate.find(query.with(context.getPageable()),IBZDict.class);
return new PageImpl<IBZDict>(list,context.getPageable(),total);
}
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册