Subversion Repositories SmartDukaan

Rev

Rev 34902 | Rev 35207 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 34902 Rev 34903
Line 134... Line 134...
134
        sendNotificationModel.setUserIds(fofoStoreRepository.selectAllDtrUserIds());
134
        sendNotificationModel.setUserIds(fofoStoreRepository.selectAllDtrUserIds());
135
        Set<AuthUser> authUsers = new HashSet<>(
135
        Set<AuthUser> authUsers = new HashSet<>(
136
                csService.getAuthUserByCategoryId(ProfitMandiConstants.TICKET_CATEGORY_RBM));
136
                csService.getAuthUserByCategoryId(ProfitMandiConstants.TICKET_CATEGORY_RBM));
137
        authUsers.addAll(csService.getAuthUserByCategoryId(ProfitMandiConstants.TICKET_CATEGORY_CATEGORY));
137
        authUsers.addAll(csService.getAuthUserByCategoryId(ProfitMandiConstants.TICKET_CATEGORY_CATEGORY));
138
        authUsers.addAll(csService.getAuthUserByCategoryId(ProfitMandiConstants.TICKET_CATEGORY_SALES));
138
        authUsers.addAll(csService.getAuthUserByCategoryId(ProfitMandiConstants.TICKET_CATEGORY_SALES));
-
 
139
        authUsers.addAll(csService.getAuthUserByCategoryId(ProfitMandiConstants.TICKET_CATEGORY_ABM));
139
        List<String> emailIds = authUsers.stream().map(x -> x.getEmailId()).collect(Collectors.toList());
140
        List<String> emailIds = authUsers.stream().map(x -> x.getEmailId()).collect(Collectors.toList());
140
        emailIds.add("devkinandan.lal@smartdukaan.com");
141
        emailIds.add("devkinandan.lal@smartdukaan.com");
141
        List<User> systemUsers = dtrUserRepository.selectAllByEmailIds(emailIds);
142
        List<User> systemUsers = dtrUserRepository.selectAllByEmailIds(emailIds);
142
        sendNotificationModel.getUserIds()
143
        sendNotificationModel.getUserIds()
143
                .addAll(systemUsers.stream().map(x -> x.getId()).collect(Collectors.toList()));
144
                .addAll(systemUsers.stream().map(x -> x.getId()).collect(Collectors.toList()));
Line 147... Line 148...
147
    @Override
148
    @Override
148
    public void sendNotificationToSystemUsers(SendNotificationModel sendNotificationModel) throws ProfitMandiBusinessException {
149
    public void sendNotificationToSystemUsers(SendNotificationModel sendNotificationModel) throws ProfitMandiBusinessException {
149
        Set<AuthUser> authUsers = new HashSet<>(csService.getAuthUserByCategoryId(ProfitMandiConstants.TICKET_CATEGORY_RBM));
150
        Set<AuthUser> authUsers = new HashSet<>(csService.getAuthUserByCategoryId(ProfitMandiConstants.TICKET_CATEGORY_RBM));
150
        authUsers.addAll(csService.getAuthUserByCategoryId(ProfitMandiConstants.TICKET_CATEGORY_CATEGORY));
151
        authUsers.addAll(csService.getAuthUserByCategoryId(ProfitMandiConstants.TICKET_CATEGORY_CATEGORY));
151
        authUsers.addAll(csService.getAuthUserByCategoryId(ProfitMandiConstants.TICKET_CATEGORY_SALES));
152
        authUsers.addAll(csService.getAuthUserByCategoryId(ProfitMandiConstants.TICKET_CATEGORY_SALES));
-
 
153
        authUsers.addAll(csService.getAuthUserByCategoryId(ProfitMandiConstants.TICKET_CATEGORY_ABM));
152
        List<String> emailIds = authUsers.stream().map(x -> x.getEmailId()).collect(Collectors.toList());
154
        List<String> emailIds = authUsers.stream().map(x -> x.getEmailId()).collect(Collectors.toList());
153
        emailIds.add("devkinandan.lal@smartdukaan.com");
155
        emailIds.add("devkinandan.lal@smartdukaan.com");
154
        List<User> systemUsers = dtrUserRepository.selectAllByEmailIds(emailIds);
156
        List<User> systemUsers = dtrUserRepository.selectAllByEmailIds(emailIds);
155
        sendNotificationModel.setUserIds(systemUsers.stream().map(x -> x.getId()).collect(Collectors.toList()));
157
        sendNotificationModel.setUserIds(systemUsers.stream().map(x -> x.getId()).collect(Collectors.toList()));
156
        this.sendNotification(sendNotificationModel);
158
        this.sendNotification(sendNotificationModel);