Subversion Repositories SmartDukaan

Rev

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

Rev 25851 Rev 28397
Line 77... Line 77...
77
 
77
 
78
		List<Device> devices = deviceRepository.selectByUserIdAndModifiedTimestamp(userIds,
78
		List<Device> devices = deviceRepository.selectByUserIdAndModifiedTimestamp(userIds,
79
				LocalDateTime.now().minusMonths(3), LocalDateTime.now());
79
				LocalDateTime.now().minusMonths(3), LocalDateTime.now());
80
 
80
 
81
		LOGGER.info("devices" + devices);
81
		LOGGER.info("devices" + devices);
-
 
82
		if (devices.isEmpty()) {
82
		pushNotification(nc.getId(), devices);
83
			pushNotification(nc.getId(), devices);
-
 
84
		}
83
	}
85
	}
84
 
86
 
85
	public void pushNotification(int cid, List<Device> devices) {
87
	public void pushNotification(int cid, List<Device> devices) {
-
 
88
 
86
		for (Device device : devices) {
89
		for (Device device : devices) {
87
			PushNotifications pn = new PushNotifications();
90
			PushNotifications pn = new PushNotifications();
88
			pn.setNotificationCampaignid(cid);
91
			pn.setNotificationCampaignid(cid);
89
			pn.setDeviceId(device.getId());
92
			pn.setDeviceId(device.getId());
90
			pn.setUserId(device.getUser_id());
93
			pn.setUserId(device.getUser_id());