Skip to content

Commit 2e99939

Browse files
authored
Merge pull request #914 from support-project/fix/issue861_display_removed_groups
#861 Changed not to display group name if the group is removed.
2 parents cb18a28 + c7c265a commit 2e99939

1 file changed

Lines changed: 11 additions & 2 deletions

File tree

src/main/java/org/support/project/knowledge/logic/TargetLogic.java

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
import java.util.List;
66
import java.util.Map;
77

8+
import org.support.project.common.config.INT_FLAG;
89
import org.support.project.common.log.Log;
910
import org.support.project.common.log.LogFactory;
1011
import org.support.project.common.util.StringUtils;
@@ -138,6 +139,10 @@ public Map<Long, List<LabelValue>> selectTargetsOnKnowledgeIds(List<Long> knowle
138139

139140
List<GroupsEntity> groups = targetsDao.selectGroupsOnKnowledgeIds(knowledgeIds);
140141
for (GroupsEntity groupsEntity : groups) {
142+
if (groupsEntity.getDeleteFlag() != null && groupsEntity.getDeleteFlag().intValue() == INT_FLAG.ON.getValue()) {
143+
// 削除済のユーザは表示しない
144+
continue;
145+
}
141146
LabelValue labelValue = new LabelValue();
142147
labelValue.setLabel(NAME_PREFIX_GROUP + groupsEntity.getGroupName());
143148
labelValue.setValue(ID_PREFIX_GROUP + groupsEntity.getGroupId());
@@ -166,9 +171,13 @@ public Map<Long, List<LabelValue>> selectTargetsOnKnowledgeIds(List<Long> knowle
166171
for (Integer groupId : groupIdMaps.get(usersEntity.getKnowledgeId())) {
167172
if (groupUserIds.get(groupId).contains(usersEntity.getUserId())) {
168173
continue;
169-
}
174+
}
175+
}
176+
177+
if (usersEntity.getDeleteFlag() != null && usersEntity.getDeleteFlag().intValue() == INT_FLAG.ON.getValue()) {
178+
// 削除済のユーザは表示しない
179+
continue;
170180
}
171-
172181
LabelValue labelValue = new LabelValue();
173182
labelValue.setLabel(NAME_PREFIX_USER + usersEntity.getUserName());
174183
labelValue.setValue(ID_PREFIX_USER + usersEntity.getUserId());

0 commit comments

Comments
 (0)