Merge pull request #511 from Anh3h/notification
Fix bug in generating notification.
This commit is contained in:
+4
-2
@@ -51,7 +51,9 @@ import javax.jms.Queue;
|
|||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
|
import java.util.HashSet;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Set;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
@@ -583,7 +585,7 @@ public class NotificationDomainServiceImpl implements NotificationDomainService
|
|||||||
|
|
||||||
private List<Long> retrieveSubscribers(Long officeId, String permission) {
|
private List<Long> retrieveSubscribers(Long officeId, String permission) {
|
||||||
|
|
||||||
Collection<TopicSubscriberData> topicSubscribers = new ArrayList<>();
|
Set<TopicSubscriberData> topicSubscribers = new HashSet<>();
|
||||||
List<Long> subscriberIds = new ArrayList<>();
|
List<Long> subscriberIds = new ArrayList<>();
|
||||||
Long entityId = officeId;
|
Long entityId = officeId;
|
||||||
String entityType= "";
|
String entityType= "";
|
||||||
@@ -596,7 +598,7 @@ public class NotificationDomainServiceImpl implements NotificationDomainService
|
|||||||
for (Role curRole : allRoles) {
|
for (Role curRole : allRoles) {
|
||||||
if (curRole.hasPermissionTo(permission) || curRole.hasPermissionTo("ALL_FUNCTIONS")) {
|
if (curRole.hasPermissionTo(permission) || curRole.hasPermissionTo("ALL_FUNCTIONS")) {
|
||||||
String memberType = curRole.getName();
|
String memberType = curRole.getName();
|
||||||
topicSubscribers = topicSubscriberReadPlatformService.getSubscribers(entityId, entityType, memberType);
|
topicSubscribers.addAll(topicSubscriberReadPlatformService.getSubscribers(entityId, entityType, memberType));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user