/** 将说说集合转换成前台需要的map */ private List SayListToMap(List<IpavsayEntity> saylist, String userid) { List<Map> rtnList = new ArrayList<Map>(); for (IpavsayEntity say : saylist) { say.setSaydate(IpavcommReplyService.DateToString(say.getSaydate())); Map map = new HashMap<String, Object>(); if (say.getSayuserid().equals(userid)) { map.put("isMyTopic", "Y"); } else { map.put("isMyTopic", "N"); } Map filemap = new HashMap<String, Object>(); filemap.put("actionid", say.getSayid()); filemap.put("actiontype", 5); IpavActionFileEntity file = sayImageMapper.queryActionfileByAction(filemap); if (file != null) { Map fmap = new HashMap<String, Object>(); fmap.put("name", file.getFilename()); fmap.put("path", file.getFilepath()); map.put("fmap", fmap); } Map commentMap = queryCommentBySid(say.getSayid(), 10); map.put("commentMap", commentMap); map.put("say", say); map.put("praisSize", commReplyService.queryPraiseOrCommentCount(1, say.getSayid(), 0)); map.put("isPrais", commReplyService.queryIsPraiseOrComment(1, say.getSayid(), 0, userid, 0)); map.put("CommentSize", commReplyService.queryPraiseOrCommentCount(1, say.getSayid(), 1)); List<Map> userPraises = searchPraiseUser(say.getSayid(), 1, null, null, 1); map.put("userPraises", userPraises); rtnList.add(map); } return rtnList; }