时间:2021-07-01 10:21:17 帮助过:15人阅读
查询个数:
template.count(query,NoticeSentRecordDto.class);
根据id修改一条记录,并返回:
public NoticeSentRecordDto selectOne(NoticeSelectInfo noticeSelectInfo){
Query query = new Query();
query.addCriteria(Criteria.where("_id").is(noticeSelectInfo.getId()));
Update update = new Update().set("isRead", true);
template.updateFirst(query, update, NoticeSentRecordDto.class);
return template.findOne(query, NoticeSentRecordDto.class);
}
mongodb操作
标签:record 分页查询 highlight ring string iter add div one