| | |
| | |
|
| | | import org.springframework.data.mongodb.core.query.Criteria;
|
| | | import org.springframework.data.mongodb.core.query.Query;
|
| | | import org.springframework.data.mongodb.core.query.Update;
|
| | | import org.springframework.stereotype.Repository;
|
| | |
|
| | | import com.yeshi.fanli.dao.MongodbBaseDao;
|
| | |
| | | );
|
| | | return mongoTemplate.findOne(query, BindRemind.class);
|
| | | }
|
| | | |
| | | |
| | | /**
|
| | | * 更新分享次数
|
| | | * @param record
|
| | | */
|
| | | public void updateInfo(BindRemind record) {
|
| | | if (record == null) {
|
| | | return;
|
| | | }
|
| | | // 查询数据是存在
|
| | | Query query = new Query();
|
| | | query.addCriteria(Criteria.where("id").is(record.getId()));
|
| | | |
| | | Update update = Update.update("createTime", record.getRemindTime());
|
| | | mongoTemplate.updateMulti(query, update, BindRemind.class);
|
| | | }
|
| | | }
|
| | |
|