Subversion Repositories SmartDukaan

Rev

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

Rev 34545 Rev 34550
Line 143... Line 143...
143
                .addAll(systemUsers.stream().map(x -> x.getId()).collect(Collectors.toList()));
143
                .addAll(systemUsers.stream().map(x -> x.getId()).collect(Collectors.toList()));
144
        this.sendNotification(sendNotificationModel);
144
        this.sendNotification(sendNotificationModel);
145
    }
145
    }
146
 
146
 
147
    @Override
147
    @Override
-
 
148
    public void sendNotificationToSystemUsers(SendNotificationModel sendNotificationModel) throws ProfitMandiBusinessException {
-
 
149
        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_SALES));
-
 
152
        List<String> emailIds = authUsers.stream().map(x -> x.getEmailId()).collect(Collectors.toList());
-
 
153
        emailIds.add("devkinandan.lal@smartdukaan.com");
-
 
154
        List<User> systemUsers = dtrUserRepository.selectAllByEmailIds(emailIds);
-
 
155
        sendNotificationModel.setUserIds(systemUsers.stream().map(x -> x.getId()).collect(Collectors.toList()));
-
 
156
        this.sendNotification(sendNotificationModel);
-
 
157
    }
-
 
158
 
-
 
159
    @Override
148
    public void sendNotification(int fofoId, String campaignName, MessageType messageType, String title, String message)
160
    public void sendNotification(int fofoId, String campaignName, MessageType messageType, String title, String message)
149
            throws ProfitMandiBusinessException {
161
            throws ProfitMandiBusinessException {
150
        SendNotificationModel sendNotificationModel = this.getDefaultNotificationModel();
162
        SendNotificationModel sendNotificationModel = this.getDefaultNotificationModel();
151
        sendNotificationModel.setCampaignName(campaignName);
163
        sendNotificationModel.setCampaignName(campaignName);
152
        sendNotificationModel.setMessageType(messageType);
164
        sendNotificationModel.setMessageType(messageType);