This commit is contained in:
insanity 2017-09-28 18:46:19 +09:00
parent 7c1df07898
commit 3c0dd5fb51
3 changed files with 76 additions and 60 deletions

View File

@ -17,6 +17,7 @@ public class Notification {
private String message; private String message;
private Member member; private Member member;
private Date confirmDate; private Date confirmDate;
private String url;
@Id @Id
@GeneratedValue(strategy= GenerationType.IDENTITY) @GeneratedValue(strategy= GenerationType.IDENTITY)
@ -75,4 +76,14 @@ public class Notification {
public void setConfirmDate(Date confirmDate) { public void setConfirmDate(Date confirmDate) {
this.confirmDate = confirmDate; this.confirmDate = confirmDate;
} }
@Column(name = "URL", nullable = false, length = 255)
public String getUrl() {
return url;
}
public void setUrl(String url) {
this.url = url;
}
} }

View File

@ -54,4 +54,9 @@ public class NotificationService {
this.notificationDAO.save(list); this.notificationDAO.save(list);
return this.readAllByMember(member, pageParams); return this.readAllByMember(member, pageParams);
} }
public Notification markAsRead(Notification notification) {
notification.setConfirmDate(new Date());
return this.notificationDAO.save(notification);
}
} }

View File

@ -1468,66 +1468,66 @@ INSERT INTO public.history (id,create_date,message,domain_id,member_id,probe_id,
100,'2017-08-24 18:33:27.217','Test History 99',1,1,1,3); 100,'2017-08-24 18:33:27.217','Test History 99',1,1,1,3);
INSERT INTO public.notification (id,confirm_date,create_date,message,title,member_id) VALUES ( INSERT INTO public.notification (id,confirm_date,create_date,message,title,member_id,url) VALUES (
1,'2017-08-29 16:39:16.198','2017-08-29 16:39:17.756','Message0','Title0',1); 1,'2017-08-29 16:39:16.198','2017-08-29 16:39:17.756','Message0','Title0',1, '/metrics');
INSERT INTO public.notification (id,confirm_date,create_date,message,title,member_id) VALUES ( INSERT INTO public.notification (id,confirm_date,create_date,message,title,member_id,url) VALUES (
2,'2017-08-29 16:39:16.285','2017-08-29 16:39:17.789','Message1','Title1',1); 2,'2017-08-29 16:39:16.285','2017-08-29 16:39:17.789','Message1','Title1',1, '/metrics');
INSERT INTO public.notification (id,confirm_date,create_date,message,title,member_id) VALUES ( INSERT INTO public.notification (id,confirm_date,create_date,message,title,member_id,url) VALUES (
3,'2017-08-29 16:39:16.306','2017-08-29 16:39:17.807','Message2','Title2',1); 3,'2017-08-29 16:39:16.306','2017-08-29 16:39:17.807','Message2','Title2',1, '/metrics');
INSERT INTO public.notification (id,confirm_date,create_date,message,title,member_id) VALUES ( INSERT INTO public.notification (id,confirm_date,create_date,message,title,member_id,url) VALUES (
4,'2017-08-29 16:39:16.322','2017-08-29 16:39:17.822','Message3','Title3',1); 4,'2017-08-29 16:39:16.322','2017-08-29 16:39:17.822','Message3','Title3',1, '/metrics');
INSERT INTO public.notification (id,confirm_date,create_date,message,title,member_id) VALUES ( INSERT INTO public.notification (id,confirm_date,create_date,message,title,member_id,url) VALUES (
5,'2017-08-29 16:39:16.336','2017-08-29 16:39:17.837','Message4','Title4',1); 5,'2017-08-29 16:39:16.336','2017-08-29 16:39:17.837','Message4','Title4',1, '/metrics');
INSERT INTO public.notification (id,confirm_date,create_date,message,title,member_id) VALUES ( INSERT INTO public.notification (id,confirm_date,create_date,message,title,member_id,url) VALUES (
6,'2017-08-29 16:39:16.350','2017-08-29 16:39:17.852','Message5','Title5',1); 6,'2017-08-29 16:39:16.350','2017-08-29 16:39:17.852','Message5','Title5',1, '/metrics');
INSERT INTO public.notification (id,confirm_date,create_date,message,title,member_id) VALUES ( INSERT INTO public.notification (id,confirm_date,create_date,message,title,member_id,url) VALUES (
7,'2017-08-29 16:39:16.365','2017-08-29 16:39:17.864','Message6','Title6',1); 7,'2017-08-29 16:39:16.365','2017-08-29 16:39:17.864','Message6','Title6',1, '/metrics');
INSERT INTO public.notification (id,confirm_date,create_date,message,title,member_id) VALUES ( INSERT INTO public.notification (id,confirm_date,create_date,message,title,member_id,url) VALUES (
8,'2017-08-29 16:39:16.377','2017-08-29 16:39:17.877','Message7','Title7',1); 8,'2017-08-29 16:39:16.377','2017-08-29 16:39:17.877','Message7','Title7',1, '/metrics');
INSERT INTO public.notification (id,confirm_date,create_date,message,title,member_id) VALUES ( INSERT INTO public.notification (id,confirm_date,create_date,message,title,member_id,url) VALUES (
9,'2017-08-29 16:39:16.391','2017-08-29 16:39:17.890','Message8','Title8',1); 9,'2017-08-29 16:39:16.391','2017-08-29 16:39:17.890','Message8','Title8',1, '/metrics');
INSERT INTO public.notification (id,confirm_date,create_date,message,title,member_id) VALUES ( INSERT INTO public.notification (id,confirm_date,create_date,message,title,member_id,url) VALUES (
10,'2017-08-29 16:39:16.403','2017-08-29 16:39:17.904','Message9','Title9',1); 10,'2017-08-29 16:39:16.403','2017-08-29 16:39:17.904','Message9','Title9',1, '/metrics');
INSERT INTO public.notification (id,confirm_date,create_date,message,title,member_id) VALUES ( INSERT INTO public.notification (id,confirm_date,create_date,message,title,member_id,url) VALUES (
11,'2017-08-29 16:39:16.417','2017-08-29 16:39:17.916','Message10','Title10',1); 11,'2017-08-29 16:39:16.417','2017-08-29 16:39:17.916','Message10','Title10',1, '/metrics');
INSERT INTO public.notification (id,confirm_date,create_date,message,title,member_id) VALUES ( INSERT INTO public.notification (id,confirm_date,create_date,message,title,member_id,url) VALUES (
12,'2017-08-29 16:39:16.430','2017-08-29 16:39:17.929','Message11','Title11',1); 12,'2017-08-29 16:39:16.430','2017-08-29 16:39:17.929','Message11','Title11',1, '/metrics');
INSERT INTO public.notification (id,confirm_date,create_date,message,title,member_id) VALUES ( INSERT INTO public.notification (id,confirm_date,create_date,message,title,member_id,url) VALUES (
13,'2017-08-29 16:39:16.442','2017-08-29 16:39:17.941','Message12','Title12',1); 13,'2017-08-29 16:39:16.442','2017-08-29 16:39:17.941','Message12','Title12',1, '/metrics');
INSERT INTO public.notification (id,confirm_date,create_date,message,title,member_id) VALUES ( INSERT INTO public.notification (id,confirm_date,create_date,message,title,member_id,url) VALUES (
14,'2017-08-29 16:39:16.454','2017-08-29 16:39:17.953','Message13','Title13',1); 14,'2017-08-29 16:39:16.454','2017-08-29 16:39:17.953','Message13','Title13',1, '/metrics');
INSERT INTO public.notification (id,confirm_date,create_date,message,title,member_id) VALUES ( INSERT INTO public.notification (id,confirm_date,create_date,message,title,member_id,url) VALUES (
15,'2017-08-29 16:39:16.467','2017-08-29 16:39:17.966','Message14','Title14',1); 15,'2017-08-29 16:39:16.467','2017-08-29 16:39:17.966','Message14','Title14',1, '/metrics');
INSERT INTO public.notification (id,confirm_date,create_date,message,title,member_id) VALUES ( INSERT INTO public.notification (id,confirm_date,create_date,message,title,member_id,url) VALUES (
16,'2017-08-29 16:39:16.479','2017-08-29 16:39:17.979','Message15','Title15',1); 16,'2017-08-29 16:39:16.479','2017-08-29 16:39:17.979','Message15','Title15',1, '/metrics');
INSERT INTO public.notification (id,confirm_date,create_date,message,title,member_id) VALUES ( INSERT INTO public.notification (id,confirm_date,create_date,message,title,member_id,url) VALUES (
17,'2017-08-29 16:39:16.493','2017-08-29 16:39:17.994','Message16','Title16',1); 17,'2017-08-29 16:39:16.493','2017-08-29 16:39:17.994','Message16','Title16',1, '/metrics');
INSERT INTO public.notification (id,confirm_date,create_date,message,title,member_id) VALUES ( INSERT INTO public.notification (id,confirm_date,create_date,message,title,member_id,url) VALUES (
18,'2017-08-29 16:39:16.508','2017-08-29 16:39:18.008','Message17','Title17',1); 18,'2017-08-29 16:39:16.508','2017-08-29 16:39:18.008','Message17','Title17',1, '/metrics');
INSERT INTO public.notification (id,confirm_date,create_date,message,title,member_id) VALUES ( INSERT INTO public.notification (id,confirm_date,create_date,message,title,member_id,url) VALUES (
19,'2017-08-29 16:39:16.522','2017-08-29 16:39:18.020','Message18','Title18',1); 19,'2017-08-29 16:39:16.522','2017-08-29 16:39:18.020','Message18','Title18',1, '/metrics');
INSERT INTO public.notification (id,confirm_date,create_date,message,title,member_id) VALUES ( INSERT INTO public.notification (id,confirm_date,create_date,message,title,member_id,url) VALUES (
20,'2017-08-29 16:39:16.533','2017-08-29 16:39:18.031','Message19','Title19',1); 20,'2017-08-29 16:39:16.533','2017-08-29 16:39:18.031','Message19','Title19',1, '/metrics');
INSERT INTO public.notification (id,confirm_date,create_date,message,title,member_id) VALUES ( INSERT INTO public.notification (id,confirm_date,create_date,message,title,member_id,url) VALUES (
21,NULL,'2017-08-29 16:39:18.042','Message20','Title20',1); 21,NULL,'2017-08-29 16:39:18.042','Message20','Title20',1, '/metrics');
INSERT INTO public.notification (id,confirm_date,create_date,message,title,member_id) VALUES ( INSERT INTO public.notification (id,confirm_date,create_date,message,title,member_id,url) VALUES (
22,NULL,'2017-08-29 16:39:18.051','Message21','Title21',1); 22,NULL,'2017-08-29 16:39:18.051','Message21','Title21',1, '/metrics');
INSERT INTO public.notification (id,confirm_date,create_date,message,title,member_id) VALUES ( INSERT INTO public.notification (id,confirm_date,create_date,message,title,member_id,url) VALUES (
23,NULL,'2017-08-29 16:39:18.062','Message22','Title22',1); 23,NULL,'2017-08-29 16:39:18.062','Message22','Title22',1, '/metrics');
INSERT INTO public.notification (id,confirm_date,create_date,message,title,member_id) VALUES ( INSERT INTO public.notification (id,confirm_date,create_date,message,title,member_id,url) VALUES (
24,'2017-08-29 16:39:16.533','2017-08-29 16:39:18.072','Message23','Title23',1); 24,'2017-08-29 16:39:16.533','2017-08-29 16:39:18.072','Message23','Title23',1, '/metrics');
INSERT INTO public.notification (id,confirm_date,create_date,message,title,member_id) VALUES ( INSERT INTO public.notification (id,confirm_date,create_date,message,title,member_id,url) VALUES (
25,NULL,'2017-08-29 16:39:18.083','Message24','Title24',1); 25,NULL,'2017-08-29 16:39:18.083','Message24','Title24',1, '/metrics');
INSERT INTO public.notification (id,confirm_date,create_date,message,title,member_id) VALUES ( INSERT INTO public.notification (id,confirm_date,create_date,message,title,member_id,url) VALUES (
26,'2017-08-29 16:39:16.533','2017-08-29 16:39:18.096','Message25','Title25',1); 26,'2017-08-29 16:39:16.533','2017-08-29 16:39:18.096','Message25','Title25',1, '/metrics');
INSERT INTO public.notification (id,confirm_date,create_date,message,title,member_id) VALUES ( INSERT INTO public.notification (id,confirm_date,create_date,message,title,member_id,url) VALUES (
27,NULL,'2017-08-29 16:39:18.108','Message26','Title26',1); 27,NULL,'2017-08-29 16:39:18.108','Message26','Title26',1, '/metrics');
INSERT INTO public.notification (id,confirm_date,create_date,message,title,member_id) VALUES ( INSERT INTO public.notification (id,confirm_date,create_date,message,title,member_id,url) VALUES (
28,'2017-08-29 16:39:16.533','2017-08-29 16:39:18.118','Message27','Title27',1); 28,'2017-08-29 16:39:16.533','2017-08-29 16:39:18.118','Message27','Title27',1, '/metrics');
INSERT INTO public.notification (id,confirm_date,create_date,message,title,member_id) VALUES ( INSERT INTO public.notification (id,confirm_date,create_date,message,title,member_id,url) VALUES (
29,NULL,'2017-08-29 16:39:18.130','Message28','Title28',1); 29,NULL,'2017-08-29 16:39:18.130','Message28','Title28',1, '/metrics');
INSERT INTO public.notification (id,confirm_date,create_date,message,title,member_id) VALUES ( INSERT INTO public.notification (id,confirm_date,create_date,message,title,member_id,url) VALUES (
30,NULL,'2017-08-29 16:39:18.143','Message29','Title29',1); 30,NULL,'2017-08-29 16:39:18.143','Message29','Title29',1, '/metrics');
INSERT INTO public.auth_crawler (auth_json,create_date,crawler_id,target_id) VALUES ( INSERT INTO public.auth_crawler (auth_json,create_date,crawler_id,target_id) VALUES (