Commit 9cc6a8e9 authored by jiaorz's avatar jiaorz

修改提前还车逻辑

parent 58258299
......@@ -124,7 +124,7 @@ public class MsgBiz {
}
public ObjectRestResponse getMsgListByUserId(Integer page, Integer limit) {
public ObjectRestResponse getMsgListByUserId(Integer page, Integer limit, Integer type) {
//获取所有朋友圈
page = page == null ? 1 : page;
limit = limit == null ? 10 : limit;
......@@ -137,8 +137,9 @@ public class MsgBiz {
}
Pageable pageable = PageRequest.of(--page, limit);
List<Integer> ids = new ArrayList<>();
ids.add(2);
ids.add(4);
if(type != null) {
ids.add(type);
}
Query query = new Query(Criteria.where("body.type").in(ids));
query.addCriteria(Criteria.where("userId").is(userId));
int totalSize = mongoTemplate.find(query, Msg.class, "s_msg").size();
......
......@@ -32,7 +32,7 @@ public class MsgController {
}
@GetMapping(value = "/getByUserId")
public ObjectRestResponse getByUserId(Integer page, Integer limit) {
return msgBiz.getMsgListByUserId(page, limit);
public ObjectRestResponse getByUserId(Integer page, Integer limit, Integer type) {
return msgBiz.getMsgListByUserId(page, limit, type);
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment