Commit 7579223479c317d5334315241cc78d98d5f1efc1
1 parent
be838df0bb
Exists in
master
聊天组显示BUG修复
Showing 1 changed file with 7 additions and 3 deletions
talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/ChatGroupController.java
View file @
7579223
... | ... | @@ -737,12 +737,16 @@ |
737 | 737 | if (CollectionUtils.isEmpty(rs)) { |
738 | 738 | rsrjson.add(reusltJsonObject); |
739 | 739 | }else { |
740 | - for (Object r : rs) { | |
741 | - JSONObject rjson = (JSONObject) JSON.toJSON(r); | |
742 | - if (!rjson.get("to").toString().equals(lymsChatgroup.getHxgroupid())) { | |
740 | + for (int i=0;i<rs.size();i++) { | |
741 | + JSONObject rjson = (JSONObject) JSON.toJSON(rs.get(i)); | |
742 | + if (rjson.get("to").toString().equals(lymsChatgroup.getHxgroupid())) { | |
743 | + break; | |
744 | + } | |
745 | + if(i==rs.size()-1){ | |
743 | 746 | rsrjson.add(reusltJsonObject); |
744 | 747 | } |
745 | 748 | } |
749 | + | |
746 | 750 | } |
747 | 751 | |
748 | 752 | } |