mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/per-boe/java-servers.git
synced 2025-12-10 19:36:50 +08:00
校验
This commit is contained in:
@@ -84,6 +84,23 @@ public class CommentsApi extends ApiBaseController{
|
|||||||
return badRequest("参数异常");
|
return badRequest("参数异常");
|
||||||
}
|
}
|
||||||
List<Comments> list = service.list(objType, objId);
|
List<Comments> list = service.list(objType, objId);
|
||||||
|
|
||||||
|
List<String> ids=new ArrayList<String>();
|
||||||
|
for(Comments c: list) {
|
||||||
|
if(c.getReplys()>0) {
|
||||||
|
ids.add(c.getId());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
List<Comments> replyList = service.findReplysByCommentIds(20, objType, ids);
|
||||||
|
|
||||||
|
for(Comments c: list) {
|
||||||
|
c.setReplyList(new ArrayList<Comments>());
|
||||||
|
for(Comments r: replyList) {
|
||||||
|
if(r.getCommentId().equals(c.getId())) {
|
||||||
|
c.getReplyList().add(r);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
return success(list);
|
return success(list);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user