Commit d8c803ef authored by jiaorz's avatar jiaorz

修改查询

parent 9fd85723
...@@ -37,7 +37,7 @@ public class MsgBiz { ...@@ -37,7 +37,7 @@ public class MsgBiz {
/* PageHelper.startPage(Integer.parseInt(map.get("page").toString()),Integer.parseInt(map.get("limit").toString())); /* PageHelper.startPage(Integer.parseInt(map.get("page").toString()),Integer.parseInt(map.get("limit").toString()));
PageInfo<Msg> goodPageInfo = new PageInfo<>(mongoTemplate.findAll(Msg.class)); PageInfo<Msg> goodPageInfo = new PageInfo<>(mongoTemplate.findAll(Msg.class));
Query query = new Query(Criteria.where("userId").is(10000012)); Query query = new Query(Criteria.where("userId").is(10000012));
List<Msg> msg= mongoTemplate.findAll(Msg.class);*/ List<Msg> msg= mongoTemplate.findAll(Msg.class, "s_msg");*/
if (null == collection) if (null == collection)
collection = MGDBCollection.getDB().getCollection("s_msg"); collection = MGDBCollection.getDB().getCollection("s_msg");
DBCursor cursor = collection.find(); DBCursor cursor = collection.find();
......
...@@ -547,8 +547,7 @@ public class Msg { ...@@ -547,8 +547,7 @@ public class Msg {
// body.videos = com.mongodb.util.JSON.parse(param.getVideos()); // body.videos = com.mongodb.util.JSON.parse(param.getVideos());
if(2 == param.getType()|| 4 == param.getType()){ if(2 == param.getType()|| 4 == param.getType()){
body.images = JSON.parseArray(param.getImages(), Resource.class); body.images = JSON.parseArray(param.getImages(), Resource.class);
if(null != body.images && 0 == body.images.size()) if(null != body.images && 0 == body.images.size())throw new ServiceException("请上传有效图片");
throw new ServiceException("请上传有效图片");
} }
// body.images = JSON.parseArray(param.getImages(), Resource.class); // body.images = JSON.parseArray(param.getImages(), Resource.class);
body.audios = JSON.parseArray(param.getAudios(), Resource.class); body.audios = JSON.parseArray(param.getAudios(), Resource.class);
......
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