| Line 393... |
Line 393... |
| 393 |
sendNotificationModel.setTitle("");
|
393 |
sendNotificationModel.setTitle("");
|
| 394 |
StringBuffer sb = new StringBuffer();
|
394 |
StringBuffer sb = new StringBuffer();
|
| 395 |
String message = null;
|
395 |
String message = null;
|
| 396 |
if (priceDrop.getDropAmount() > 0) {
|
396 |
if (priceDrop.getDropAmount() > 0) {
|
| 397 |
title = String.format(title, "dropped", items.get(0).getItemDescriptionNoColor());
|
397 |
title = String.format(title, "dropped", items.get(0).getItemDescriptionNoColor());
|
| 398 |
message = String.format("Price has been dropped from Rs.%d. Old DP - Rs.%d, New DP - Rs.%d", priceDrop.getDropAmount(),
|
398 |
message = String.format("Price has been dropped from Rs.%s. Old DP - Rs.%s, New DP - Rs.%s", FormattingUtils.formatDecimal(priceDrop.getDropAmount()),
|
| 399 |
priceDrop.getOldDp(), priceDrop.getNewDp());
|
399 |
FormattingUtils.formatDecimal(priceDrop.getOldDp()), FormattingUtils.formatDecimal(priceDrop.getNewDp()));
|
| 400 |
} else {
|
400 |
} else {
|
| 401 |
title = String.format(title, "increased", items.get(0).getItemDescriptionNoColor());
|
401 |
title = String.format(title, "increased", items.get(0).getItemDescriptionNoColor());
|
| 402 |
message = String.format("Price has been increased from Rs.%d. Old DP - Rs.%d, New DP - Rs.%d", -priceDrop.getDropAmount(),
|
402 |
message = String.format("Price has been increased from Rs.%s. Old DP - Rs.%s, New DP - Rs.%s", FormattingUtils.formatDecimal(-priceDrop.getDropAmount()),
|
| 403 |
priceDrop.getOldDp(), priceDrop.getNewDp());
|
403 |
FormattingUtils.formatDecimal(priceDrop.getOldDp()), FormattingUtils.formatDecimal(priceDrop.getNewDp()));
|
| 404 |
}
|
404 |
}
|
| 405 |
sendNotificationModel.setTitle(title);
|
405 |
sendNotificationModel.setTitle(title);
|
| 406 |
sendNotificationModel.setMessage(message);
|
406 |
sendNotificationModel.setMessage(message);
|
| 407 |
sendNotificationModel.setMessageType(MessageType.pricechange);
|
407 |
sendNotificationModel.setMessageType(MessageType.pricechange);
|
| 408 |
notificationService.sendNotificationToAll(sendNotificationModel);
|
408 |
notificationService.sendNotificationToAll(sendNotificationModel);
|