Skip to content

Commit

Permalink
fixed issue of duplicate entries
Browse files Browse the repository at this point in the history
  • Loading branch information
azhamn committed Mar 18, 2020
1 parent 484e0e7 commit 21d8d29
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,10 @@ public Integer getLastAlertNotificationId() {
}

public int addAlertNotification(AlertNotificationRequest notification) {

jdbcTemplate.update("INSERT INTO `notification` (`title`, `subtitle`, `source`, `message_en`, `message_si`, `message_ta`) VALUES (?,?,?,?,?,?)",
notification.getTitle(), notification.getSubtitle(), notification.getSource(),
notification.getMessageEn(), notification.getMessageSi(), notification.getMessageTa());
//
// jdbcTemplate.update("INSERT INTO `notification` (`title`, `subtitle`, `source`, `message_en`, `message_si`, `message_ta`) VALUES (?,?,?,?,?,?)",
// notification.getTitle(), notification.getSubtitle(), notification.getSource(),
// notification.getMessageEn(), notification.getMessageSi(), notification.getMessageTa());

KeyHolder holder = new GeneratedKeyHolder();
jdbcTemplate.update(connection -> {
Expand Down

0 comments on commit 21d8d29

Please sign in to comment.