Skip to content

Commit

Permalink
Merge pull request #914 from support-project/fix/issue861_display_rem…
Browse files Browse the repository at this point in the history
…oved_groups

#861 Changed not to display group name if the group is removed.
  • Loading branch information
koda-masaru authored Oct 18, 2017
2 parents cb18a28 + c7c265a commit 2e99939
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions src/main/java/org/support/project/knowledge/logic/TargetLogic.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import java.util.List;
import java.util.Map;

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

List<GroupsEntity> groups = targetsDao.selectGroupsOnKnowledgeIds(knowledgeIds);
for (GroupsEntity groupsEntity : groups) {
if (groupsEntity.getDeleteFlag() != null && groupsEntity.getDeleteFlag().intValue() == INT_FLAG.ON.getValue()) {
// 削除済のユーザは表示しない
continue;
}
LabelValue labelValue = new LabelValue();
labelValue.setLabel(NAME_PREFIX_GROUP + groupsEntity.getGroupName());
labelValue.setValue(ID_PREFIX_GROUP + groupsEntity.getGroupId());
Expand Down Expand Up @@ -166,9 +171,13 @@ public Map<Long, List<LabelValue>> selectTargetsOnKnowledgeIds(List<Long> knowle
for (Integer groupId : groupIdMaps.get(usersEntity.getKnowledgeId())) {
if (groupUserIds.get(groupId).contains(usersEntity.getUserId())) {
continue;
}
}
}

if (usersEntity.getDeleteFlag() != null && usersEntity.getDeleteFlag().intValue() == INT_FLAG.ON.getValue()) {
// 削除済のユーザは表示しない
continue;
}

LabelValue labelValue = new LabelValue();
labelValue.setLabel(NAME_PREFIX_USER + usersEntity.getUserName());
labelValue.setValue(ID_PREFIX_USER + usersEntity.getUserId());
Expand Down

0 comments on commit 2e99939

Please sign in to comment.