Subversion Repositories SmartDukaan

Rev

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

Rev 35236 Rev 35252
Line 318... Line 318...
318
            }
318
            }
319
            this.sendCombinedSchemesNotification(schemes);
319
            this.sendCombinedSchemesNotification(schemes);
320
        }
320
        }
321
    }
321
    }
322
 
322
 
-
 
323
    @Override
-
 
324
    public void expireSchemeByIds(List<Scheme> schemes) throws ProfitMandiBusinessException {
-
 
325
        if (schemes.size() > 0) {
-
 
326
            for (Scheme scheme : schemes) {
-
 
327
                if (scheme.getExpireTimestamp() != null) {
-
 
328
                    continue;
-
 
329
                }
-
 
330
                scheme.setExpireTimestamp(scheme.getEndDateTime());
-
 
331
            }
-
 
332
            this.sendCombinedSchemesNotification(schemes);
-
 
333
        }
-
 
334
    }
-
 
335
 
323
    private void sendSchemeNotification(Scheme scheme) throws ProfitMandiBusinessException {
336
    private void sendSchemeNotification(Scheme scheme) throws ProfitMandiBusinessException {
324
        if (NOFITY_SCHEME_TYPES.contains(scheme.getType())) {
337
        if (NOFITY_SCHEME_TYPES.contains(scheme.getType())) {
325
 
338
 
326
            SendNotificationModel sendNotificationModel = new SendNotificationModel();
339
            SendNotificationModel sendNotificationModel = new SendNotificationModel();
327
            List<SchemeItem> schemeItems = schemeItemRepository.selectBySchemeIds(Collections.singleton(scheme.getId()));
340
            List<SchemeItem> schemeItems = schemeItemRepository.selectBySchemeIds(Collections.singleton(scheme.getId()));